Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix click on <Datagrid> Select All button bubbles up to parent Datagrid #9567

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

Dreamsorcerer
Copy link
Contributor

This adds stopPropagation() to the entire DataGrid, to avoid propagation when clicking anywhere in the grid.

Currently, clicking the select all checkbox or an empty space on the header still triggers the click on the parent element (e.g. nest 2 DataGrids and the select all button will trigger the rowClick of the parent DataGrid).

If this approach seems too much, then we could move this line to the checkbox in DataGridHeader.

@fzaninotto
Copy link
Member

This approach is too much, especially since it means to support a feature (nested datagrids) that we don't want to support.

@Dreamsorcerer
Copy link
Contributor Author

Well, all the other inputs stop propagation, so move to the checkbox instead (as mentioned in the description)?

@fzaninotto
Copy link
Member

Yes, the checkbox can stop propagation

@Dreamsorcerer
Copy link
Contributor Author

Moved to Select all checkbox.

@fzaninotto fzaninotto changed the title stopPropagation() on DataGrid Fix click on <Datagrid> Select All button bubbles up to parent Datagrid Jan 11, 2024
@fzaninotto fzaninotto merged commit 513a480 into marmelab:master Jan 11, 2024
10 checks passed
@fzaninotto fzaninotto added this to the 4.16.6 milestone Jan 11, 2024
@fzaninotto
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants