gwt-material-table
gwt-material-table copied to clipboard
addRowShortPressHandler "bouncing"
Hello,
I have a table on which I added a ShortPressHandler via the addRowShortPressHandler(...) method. The event works fine but apparently fires multiple times within milliseconds, which results in unexpected behaviour. In my case I open a modal on click of a row and these multiple fires result in multiple lean overlays added by the modal.
Can anyone confirm this or is my implementation faulty?
kr
Try increasing the longPressDuration (which the shortPress bases itself off) to see if this helps the issue.
table.setLongPressDuration(1000);
I believe the default is 500ms.
Doesn't seem to help in this case.
Were you able progress this at all? Will take a look, but if you have any more info it will help.
Sry, I forgot about this ticket.
I could fix this issue by preventing the event propagation using
shortPressEvent.getEvent().stopImmediatePropagation();
Okay, were you registering a LongPressHandler to the table at all?
No, I just added a ShortPressHandler.