How to keep menu open on mobile for useComboBox when the keyboard closes
chadwtkns opened this issue · comments
downshift
version: 8.2.2node
version: 8.19.4npm
(oryarn
) version: 1.22.19 (Yarn)
Like the title says Im struggling with how to keep the menu open on a useComboBox if the keyboard closes in a mobile setting. I've only tested this in Safari on iOS but you can reproduce this in the first example in the documentation. So expected behavior would be even after clicking 'Done' that the comboBox stays open? How can I achieve this? Thank you.
Hi @chadwtkns! Not sure how what events are triggered (if any) when the iOS keyboard is closed.
useCombobox provides many ways to control the isOpen
state prop, such as https://github.com/downshift-js/downshift/tree/master/src/hooks/useCombobox#statereducer, https://github.com/downshift-js/downshift/tree/master/src/hooks/useCombobox#defaultisopen or https://github.com/downshift-js/downshift/tree/master/src/hooks/useCombobox#isopen.
One of those options should work for you.