up style multi selector
This commit is contained in:
parent
ffb9027691
commit
ac31045ad4
6 changed files with 63 additions and 42 deletions
|
@ -62,13 +62,6 @@ export class MultiSelector implements OnInit {
|
|||
console.log('toggle selected choice ', choice, 'in filter ', this.label);
|
||||
this.selectedChoicesChange.emit(choice);
|
||||
console.log(choice);
|
||||
this.store.dispatch({
|
||||
type: this.actionTypes.UPDATE_FILTER,
|
||||
payload: {
|
||||
filter: this.label,
|
||||
selectedChoice: choice
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
availableChoicesChangeToggleItem(choice: any) {
|
||||
|
@ -80,14 +73,7 @@ export class MultiSelector implements OnInit {
|
|||
const value = typeof c === 'string' ? c : c?.value;
|
||||
return value !== clickedValue;
|
||||
});
|
||||
this.store.dispatch({
|
||||
type: this.actionTypes.UPDATE_FILTER,
|
||||
payload: {
|
||||
filter: this.label,
|
||||
availableChoice: choice
|
||||
}
|
||||
}
|
||||
)
|
||||
console.log('toggle available choices', this.label, choice);
|
||||
}
|
||||
|
||||
onInputClickedOrFocused(event?: any) {
|
||||
|
@ -111,4 +97,9 @@ export class MultiSelector implements OnInit {
|
|||
this.displayDropdown = true;
|
||||
console.log('Opened dropdown:', this.displayDropdown);
|
||||
}
|
||||
|
||||
resetChoicesLists() {
|
||||
this.selectedChoices = [];
|
||||
this.availableChoices = [];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue