mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
Stops propagation of clicks when combined with data table header, which triggers data table sort function.
This commit is contained in:
parent
443f957027
commit
8b19106ae9
1 changed files with 3 additions and 1 deletions
|
@ -155,7 +155,9 @@
|
||||||
{inline && 'bx--dropdown--inline'}
|
{inline && 'bx--dropdown--inline'}
|
||||||
{disabled && 'bx--dropdown--disabled'}
|
{disabled && 'bx--dropdown--disabled'}
|
||||||
{light && 'bx--dropdown--light'}"
|
{light && 'bx--dropdown--light'}"
|
||||||
on:click="{({ target }) => {
|
on:click="{(e) => {
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
const { target } = e;
|
||||||
open = ref.contains(target) ? !open : false;
|
open = ref.contains(target) ? !open : false;
|
||||||
}}"
|
}}"
|
||||||
disabled="{disabled}"
|
disabled="{disabled}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue