Search code examples
primengprimeng-dropdowns

Primeng multiSelect filter text need to clear on 'onPanelHide' event


Primeng multiSelect filter text need to clear on 'onPanelHide' event


Solution

  • The documentation specifies to use the callback onPanelHide https://www.primefaces.org/primeng/#/multiselect

    <p-multiSelect (onPanelHide)="handlePanelHide()" [options]="cities1" [(ngModel)]="selectedCities1"></p-multiSelect>

    Then in your component you will perform your logic to do the filtering

    public handlePanelHide(): void { // Filter the options with your custom logic }