menuIsOpen does not work on mobile device

https://xi0os.csb.app/
https://codesandbox.io/s/react-codesandboxer-example-xi0os
When I try to use menuIsOpen props to control state react-select, it works only on desktop but for mobile look like event onClick does not fire.
On mobile you should use the onTouchStart event instead of onClick. Here's a modified codesandbox with the update.
@Xartok thanks for helping, but I don't understand why can't we just use onClick event.
Why onClick still work on mobile when I use it with div element?
Hi @armspkt,
I wanted to check in and see if you were still encountering this issue, or managed to find a reason why onClick wasn't working for you. We're triaging issues at the moment to sustain the project going forward.
@bladey This issue still happens on the mobile device.
Greetings @armspkt
I wanted to make sure I addressed your questions.
thanks for helping, but I don't understand why can't we just use
onClickevent.
- The innerProps passed to the
IndicatorsContainercontain eventBindings foronTouchEndandonMouseDown. - These events fire earlier in the event lifecycle than
onClick. - The attached methods prevent the event call from carrying through to the onClick event
Here is the code to see for yourself what is going on. https://github.com/JedWatson/react-select/blob/998c979b4ed51ee39b87c9b2f0f03da440017dcf/packages/react-select/src/Select.js#L952-#L968
Why
onClickstill work on mobile when I use it with div element?
The div likely doesn't have a onTouchEnd method calling event.stopPropagation, so your click event would be completely unimpeded.
Given that this is not a bug, I will be closing this issue, but am open to further discussing any questions.