Open michaelgaigg opened 3 years ago
Open to PRs on this if you have a use case where this is useful to you. In most cases cases I have just done this with Svelte's reactive declarations with values on those elements bound to variables.
Something like this
let menuItems = [{},{}];
let selectedItem;
$: selectedItem, functionName(); //run this when selectedItem changes
<SelectMenu bind:menuItems={menuItems} bind:value={selectedItem}/>
At a minimum emit event.detail with attributes like value or checked, e.g. SelectMenu change event has event.detail.value but Checkbox change event does not transmit event.detail