select
Description
fires when a new option is selected in a rich selectParameters
- ev - (object) a CustomEvent object
Example
<script>
function handleSelect(ev) {
const newSelection = ev.detail;
console.log(newSelection);
//=>{selected:{id:97, name:'August Dvorak', email:'dvor.august@gmail.com', avatar:'august.jpg'}}
}
</script>
<RichSelect value={1} on:select={handleSelect}/>
Details
The handler function returns the object of the newly selected option.
Related article: Catching the change of selected option