In my parent component I'm calling child component as:
<c-multiselect-picklist multi-picklist-values={picklistValues} onselect={handleChange}
preselected-string={selectedPicklistValue} data-id="first"></c-multiselect-picklist>
JS:
picklistValues = {};
picklistOptions = [ { label: 'First', value: 'First'},
{ label: 'Second', value: 'Second'},
{ label: 'Third', value: 'Third'},
{ label: 'Fourth', value: 'Fourth'}
];
connectedCallback() {
this.picklistValues.label = '';
this.picklistValues.optionsToSelect = this.picklistOptions;
this.selectedPicklistValue = 'Some String';
}
In the UI, I have a button reset and on click of that I would like to reset multiselect child LWC to initial state without any selections. How this can be achieved in LWC.
I tried with making picklistValues as null but still lightning combobox shows selected options.