You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are are certain callbacks like onPress which do not take an Event instance. There is no way to cancel the rest of the event handler chain. It may be good to enable this. See for example SegmentedControl, where there is no way to stop the inner onPress handler from running.
Possibly also useful for event handlers that do take an Event? Because event.stopPropagation() right now is not respected by our own components, only by the browser.
Question: since there's no Event argument, how do we communicate this? Options:
Add a (first) argument to all these callbacks that takes a basic Event-like argument.
Use this: this.cancel().
The text was updated successfully, but these errors were encountered:
mkrause
changed the title
Event canceling for onPress callback
Implement canceling for event-less callbacks (e.g. onPress)
Feb 17, 2025
There are are certain callbacks like
onPress
which do not take anEvent
instance. There is no way to cancel the rest of the event handler chain. It may be good to enable this. See for exampleSegmentedControl
, where there is no way to stop the inneronPress
handler from running.Possibly also useful for event handlers that do take an
Event
? Becauseevent.stopPropagation()
right now is not respected by our own components, only by the browser.Question: since there's no
Event
argument, how do we communicate this? Options:Event
-like argument.this
:this.cancel()
.The text was updated successfully, but these errors were encountered: