more settings

This commit is contained in:
jonaswinkler
2020-12-29 17:09:07 +01:00
parent fe73f42495
commit 09bc259246
9 changed files with 194 additions and 63 deletions

View File

@@ -195,6 +195,9 @@ export class FilterableDropdownComponent {
@Input()
editing = false
@Input()
applyOnClose = false
@Output()
apply = new EventEmitter<ChangedItems>()
@@ -208,7 +211,9 @@ export class FilterableDropdownComponent {
applyClicked() {
if (this.selectionModel.isDirty()) {
this.dropdown.close()
this.apply.emit(this.selectionModel.diff())
if (!this.applyOnClose) {
this.apply.emit(this.selectionModel.diff())
}
}
}
@@ -223,6 +228,9 @@ export class FilterableDropdownComponent {
this.open.next()
} else {
this.filterText = ''
if (this.applyOnClose && this.selectionModel.isDirty()) {
this.apply.emit(this.selectionModel.diff())
}
}
}