select
Description
fires when a new option is selected in a MultiComboParameters
- ev - (object) a CustomEvent object. Its
detail
property contains:- selected - (array) an array with the selected options
Example
<script>
function handleSelect(ev) {
const newSelection = ev.detail;
console.log(newSelection);
// check the details for the returned value
}
</script>
<MultiCombo options={users} textField="name" value={[1,2,3]} on:select={handleSelect}/>
Details
The handler function receives an array of selected options objects. For example:
{selected:[
{id: 102, name: 'Petyr Baelish', email: 'big.finger@gmail.com', avatar: 'baelish.jpg'},
{id: 104, name: 'Lord Varys', email: 'little.birds@gmail.com', avatar: 'varys.jpg'}
]}
Related article: Getting an array of selected options