Open askaFed opened 7 years ago
Hi @askaFed. Sorry for late reply - I was on holiday. When you click 'remove' on one of the selector it emits the selectionChanged
event with param null
. What you can do is:
<bm-ng2-select
placeholder="Select a country"
(selectionChanged)="onSelectionChange($event);">
<bm-ng2-option value="PL">Poland</bm-ng2-option>
<bm-ng2-option value="US" disabled="true">USA</bm-ng2-option>
<bm-ng2-option value="DK" selected="true">Denmark</bm-ng2-option>
<bm-ng2-option value="FR">France</bm-ng2-option>
</bm-ng2-select>
now in your component you can do:
private onSelectionChange(value: string) {
if (null === value) {
// remove button was pressed
}
}
I have multiple select components. If I click 'remove' in one of them, I want to remove values from some other select components. Could you give me some advice how to do this?