akgulebubekir / Maui.DataGrid

DataGrid component for Maui
MIT License
261 stars 54 forks source link

Datagrid Tap Gesture Prevents Interacting With Embedded Controls #175

Closed darms1237 closed 7 months ago

darms1237 commented 7 months ago

Describe the bug In a recent update, I believe a tap gesture recognizer was added to each datagrid row. This has created a problem with my app because in my data grids I've embedded different buttons in various columns. Now, tapping these buttons never fires their clicked events. I believe this is happening because a tap gesture recognizer is sitting on top of everything and swallowing all taps.

To Reproduce Steps to reproduce the behavior:

  1. Create a custom column in a datagrid with a CellTemplate set to a Button.
  2. Wire this button up with a clicked event handler or bound to a command.
  3. Run the app
  4. Try tapping on the button and see that nothing happens.

Expected behavior Tapping on a button embedded within a datagrid row should invoke that buttons command and/or clicked event.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Some context on how this use case is useful: Let's take the sample app for example. It deals with sports teams. Perhaps, we have a datagrid that shows all the different teams in the league. We might want to add navigation buttons in each row. Maybe tapping one button directs you to a different screen showing the team's upcoming schedule, while tapping a different button navigates to a page explaining the history of that team. Yet another button takes you to a screen showing the team's roster. Finally, maybe there's a fourth button that simply favorites the team.

With my app this was working with previous versions of this nuget, but no longer.

darms1237 commented 7 months ago

On second look, this doesn't seem to be a problem with the sample app. So, I must just be doing something wrong in my app. Disregard this.

symbiogenesis commented 7 months ago

I think you were actually correct to open this. And I think the problem is on Android, but not on Windows.