[web] Hide typeahead if multiple characters are selected
Summary:
As discussed here: https://linear.app/comm/issue/ENG-2891/refactor-some-of-the-native-typeahead-creation-logic-and-make-web
and here: https://linear.app/comm/issue/ENG-2888/typeahead-decide-what-to-do-with-multi-character-selection-near-symbol
we needed a little refactor in web typeahead.
This diff resolves both.
It is possible to rewrite condtional event tighter, but we would need to wrap them in signle useMemo
which might hurt our performance. This way feel clear enough and we use utility function prepared earlier.
Test Plan:
Tested if web typeahead works propery:
Reviewers: inka, michal, kamil
Reviewed By: inka
Subscribers: ashoat, tomek, atul, kamil, michal, inka
Differential Revision: https://phab.comm.dev/D6557