MultiSelect: Overlay not repositioned after filtering options #13571
Labels
LTS-PORTABLE
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
The position of the overlay is not updated after the option is filtered.
I'm looking for the problem in the code of the MultiSelect, I think the onFilterInputChange method needs to set the filtered attribute to true.
onFilterInputChange(event: KeyboardEvent) {
this._filterValue = (event.target).value;
this.activateFilter();
// ADD "this.filtered = true;" HERE FIX THE PROBLEM
this.onFilter.emit({ originalEvent: event, filter: this._filterValue });
this.cd.detectChanges();
}
Environment
Windows 10
WSL Ubuntu
Reproducer
https://primeng-multiselect-bug-repositioning-reproduction.stackblitz.io
Angular version
16.1.7
PrimeNG version
16.2.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.17.0
Browser(s)
Firefox 116.0.3 (64 bits) and Google Chrome 116.0.5845.111
Steps to reproduce the behavior
Create multiselect with one very long option:
Filter long option:
Expected behavior
The overlay position need to be update:
The text was updated successfully, but these errors were encountered: