Take care the filter drop down is positioned correctly

pull/7566/head
Henriette Dinger 5 years ago
parent baaf5dc123
commit a3598498fe
  1. 1
      frontend/src/app/components/filters/filter-toggled-multiselect-value/filter-toggled-multiselect-value.component.html
  2. 7
      frontend/src/app/components/filters/filter-toggled-multiselect-value/filter-toggled-multiselect-value.component.ts

@ -6,6 +6,7 @@
(change)="setValues($event)" (change)="setValues($event)"
(add)="repositionDropdown()" (add)="repositionDropdown()"
(remove)="repositionDropdown()" (remove)="repositionDropdown()"
(open)="repositionDropdown()"
[compareWith]="compareByHrefOrString" [compareWith]="compareByHrefOrString"
[clearSearchOnAdd]="true" [clearSearchOnAdd]="true"
[placeholder]="text.placeholder" [placeholder]="text.placeholder"

@ -112,8 +112,11 @@ export class FilterToggledMultiselectValueComponent implements OnInit, AfterView
} }
public repositionDropdown() { public repositionDropdown() {
if (this.ngSelectInstance && this.ngSelectInstance.dropdownPanel) { if (this.ngSelectInstance) {
setTimeout(() => this.ngSelectInstance.dropdownPanel.adjustPosition(), 25); setTimeout(() => {
const component = (this.ngSelectInstance) as any;
component.dropdownPanel._updatePosition();
}, 25);
} }
} }

Loading…
Cancel
Save