Skip to content

Stop specific Cell event propagation when using onRowAction #6449

Answered by snowystinger
lucadido06 asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, for the delay. Since you're using using your own button, you'll need to stopPropagation on onPointerDown so it doesn't get to the row. onClick is problematic for many reasons, they're outlined in https://react-spectrum.adobe.com/blog/building-a-button-part-1.html. It would probably be easier if you could use a RAC Button, or useButton, or usePress (in order of suggested preference). These will all handle stopping the propagation and preventing defaults for you in a way that will most easily work with the rest of our interactions.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lucadido06
Comment options

@snowystinger
Comment options

Answer selected by snowystinger
@nicktytarenko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants