Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSelect: Overlay not repositioned after filtering options #13571

Closed
guillaume-tritsch opened this issue Aug 29, 2023 · 1 comment · Fixed by #13587
Closed

MultiSelect: Overlay not repositioned after filtering options #13571

guillaume-tritsch opened this issue Aug 29, 2023 · 1 comment · Fixed by #13587
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@guillaume-tritsch
Copy link

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:
image

Filter long option:
image

Expected behavior

The overlay position need to be update:
image

@guillaume-tritsch guillaume-tritsch added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 29, 2023
@guillaume-tritsch
Copy link
Author

guillaume-tritsch commented Aug 29, 2023

I closed the issue by mistake

guillaume-tritsch pushed a commit to guillaume-tritsch/primeng that referenced this issue Aug 31, 2023
@gucal gucal added this to the 16.3.2 milestone Aug 31, 2023
@gucal gucal added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 31, 2023
cetincakiroglu added a commit that referenced this issue Sep 21, 2023
fix: #13571 | Multiselect not repositioned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants