carbon-design-system / carbon-components-svelte

Svelte implementation of the Carbon Design System
https://svelte.carbondesignsystem.com
Apache License 2.0
2.71k stars 261 forks source link

DataTable on:click:row is missing target and currentTarget information #1904

Open Sahasrara opened 9 months ago

Sahasrara commented 9 months ago

I'm not sure if this is a bug or by design, but it's currently not possible to discern which element the user clicked on when you use on:click:row with DataTables.

My use case: I'm hoping to execute a function only when the user clicked on empty space in a row. If they click on buttons or other elements I have embedded in the table, I'd like to go with the default behavior. But since currentTarget/target don't get set, it's not possible.