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:
brunnerh 2022-01-08 18:24:33 +01:00 committed by GitHub
commit e8be9280c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}>