Forward Modal: Fix selecting chat from keyboard

This commit is contained in:
Alexander Zinchuk 2021-12-24 01:26:12 +01:00
parent 0c3c86ab55
commit 08b062e40d

View File

@ -48,7 +48,10 @@ const ChatOrUserPicker: FC<OwnProps> = ({
const lang = useLang();
const [viewportIds, getMore] = useInfiniteScroll(loadMore, chatOrUserIds, Boolean(filter));
useInputFocusOnOpen(filterRef, isOpen, () => { onFilterChange(''); });
const resetFilter = useCallback(() => {
onFilterChange('');
}, [onFilterChange]);
useInputFocusOnOpen(filterRef, isOpen, resetFilter);
// eslint-disable-next-line no-null/no-null
const containerRef = useRef<HTMLDivElement>(null);