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
I migrated our fixed-data-table project over to use the fixed-data-table-2 with the new touchScrollEnabled feature and the scrolling with momentum on mobile devices is awesome. However I was experiencing an issue where the onClick handler on my cell component wasn't getting called.
I ended up commenting out the event.preventDefault() lines in the onTouchStart and onTouchEnd functions in ReactTouchHandler.js. That fixed the problem for me and as of yet has not caused any additional issues I have noticed with the scroll functionality.
I mainly just wanted to highlight this in case it's useful. I'm also curious though, is it an issue that other people have noticed, or is it perhaps getting caused by some conflicting code specific to my project? Also i'm curious if there are expected consequences I should be aware of due to disabling the event.preventDefault functions in onTouchStart and onTouchEnd.
Thanks for creating the issue! I think this is just a case of overzealous calls to preventDefault.
I've updated PR 19 to include the fix you've suggested.
One thing I noticed while playing with this is previously tapping a row on my android would not select text in that row, while now without the prevent defaults, it will select the text tapped on. Scrolling is unaffected and will not result in selecting text. This seems correct, as the implementer of the cell should be responsible for capturing events and deciding if they should propagate.
I migrated our fixed-data-table project over to use the fixed-data-table-2 with the new touchScrollEnabled feature and the scrolling with momentum on mobile devices is awesome. However I was experiencing an issue where the
onClick
handler on my cell component wasn't getting called.I ended up commenting out the
event.preventDefault()
lines in the onTouchStart and onTouchEnd functions in ReactTouchHandler.js. That fixed the problem for me and as of yet has not caused any additional issues I have noticed with the scroll functionality.I mainly just wanted to highlight this in case it's useful. I'm also curious though, is it an issue that other people have noticed, or is it perhaps getting caused by some conflicting code specific to my project? Also i'm curious if there are expected consequences I should be aware of due to disabling the event.preventDefault functions in onTouchStart and onTouchEnd.
Thanks!
#5
The text was updated successfully, but these errors were encountered: