mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
Update TileGroup on programmatic selection change. (#971)
Only fire `select` event for user interaction (from RadioTile). Uses `set` function instead of `$` to prevent cyclic dependency error.
This commit is contained in:
parent
31a11e6800
commit
e8be9280c7
1 changed files with 2 additions and 1 deletions
|
@ -26,11 +26,12 @@
|
|||
},
|
||||
update: (value) => {
|
||||
selectedValue.set(value);
|
||||
dispatch("select", value);
|
||||
},
|
||||
});
|
||||
|
||||
$: selected = $selectedValue;
|
||||
$: dispatch("select", $selectedValue);
|
||||
$: selectedValue.set(selected);
|
||||
</script>
|
||||
|
||||
<fieldset disabled="{disabled}" class:bx--tile-group="{true}" {...$$restProps}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue