ng-matero / extensions

Angular Material Extensions Library.
https://ng-matero.github.io/extensions/
MIT License
393 stars 48 forks source link

feat(data-grid): added disableRowSelectionWithClick option #212

Closed nckenn closed 1 year ago

nckenn commented 1 year ago

I think it's better to give an option to disable selection when row-clicking.

nzbin commented 1 year ago

Thanks for your PR, I don't quite understand this feature. The data grid can't select row with row-clicking by default, and you can use the multiSelectionWithClick to enable it.

nckenn commented 1 year ago

Thanks for your PR, I don't quite understand this feature. The data grid can't select row with row-clicking by default, and you can use the multiSelectionWithClick to enable it.

Basically, what it does is prevent making the checkbox check when row clicking; kindly check the video below. Example scenario: When I click a row, I just want to pop up some modals. By default, when I click a row, it will toggle the select and show the modal, but with this PR, it will prevent toggling the checkbox and only show the modal.

Also, it will highlight the row that was click.

chrome_goekZyzsR3

nzbin commented 1 year ago

The new version 15.5.0 has added a new prop disableRowClickSelection, please try it.

nckenn commented 1 year ago

The new version 15.5.0 has added a new prop disableRowClickSelection, please try it.

Why not merge my request? You can even tell me to adjust it if you want to, anyways thank you.

PS: i wish you had included also the class "selected" when the row is clicked.