GwtMaterialDesign / gwt-material-table

A complex table component designed for the material design specifications
https://gwtmaterialdesign.github.io/gmd-table-demo/
Apache License 2.0
27 stars 31 forks source link

TableRow ShortPressHandler in combination with Button Clickhandler #146

Open simerlec opened 6 years ago

simerlec commented 6 years ago

Hey,

simple scenario - I have a standard table with a RowShortPressHandler. Inside the TableRows is a button with a ClickHandler. Now the usual thing would be do simply stop the propagation of the click event so that when the button is clicked the RowShortPressHandler does not fire. For some reason this does not work though. Any ideas?

My guess is that the clickHandler on the button works with standard ClickEvent whereas the RowShortPressHandler works with a different kind of event?

thanks and kr

BenDol commented 6 years ago

Did you manage to make any progress on this issue? I think that the event propagation is universal, so the RowShortPressHandler is firing before the click event is firing? That is what happens with the Row selection check box, the the row (the object that has the RowShortPressHandler) is the container to the button so it favors its events first.

BenDol commented 6 years ago

As seen here: https://github.com/GwtMaterialDesign/gwt-material-table/blob/d89aea9c47908af0a9353a4a5f3f9e862ca0a015/src/main/java/gwt/material/design/client/data/BaseRenderer.java#L169

simerlec commented 6 years ago

Thanks for the response.

I did not pursue this issue further since I went with a different approach concerning my UI.