mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(data-table): forgo "click", "click:row" events if target is an OverflowMenu (#918)
#917
This commit is contained in:
parent
6ba20fdd65
commit
4f83b2d1e1
1 changed files with 9 additions and 1 deletions
|
@ -336,7 +336,15 @@
|
|||
: ''} {expandable && parentRowId === row.id
|
||||
? 'bx--expandable-row--hover'
|
||||
: ''}"
|
||||
on:click="{() => {
|
||||
on:click="{({ target }) => {
|
||||
// forgo "click", "click:row" events if target resembles an overflow menu
|
||||
if (
|
||||
[...target.classList].some((name) =>
|
||||
/^bx--overflow-menu/.test(name)
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
dispatch('click', { row });
|
||||
dispatch('click:row', row);
|
||||
}}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue