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

Component: Dropdown - display bug when using virtualScroll and filter together #14280

Closed
lak357 opened this issue Dec 5, 2023 · 2 comments
Closed
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@lak357
Copy link

lak357 commented Dec 5, 2023

Describe the bug

I defined a p-dropdown that uses the virtualScroll and the filter at the same time.

When you search for an element, the list is updated with the elements that are related to the search.

However, when the list of elements corresponding to the search contains few elements (not enough for the scroll bar to be displayed) and we click outside the list and then reopen it, then the height of the list is much too large compared to the size needed.

Environment

Angular 16.2.0
Primeng 16.9.1

Reproducer

https://stackblitz.com/edit/ca7vez?file=src%2Fapp%2Fdemo%2Fdropdown-reactive-forms-demo.html

Angular version

16.2.0

PrimeNG version

16.9.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.20.2

Browser(s)

Different versions of chrome and firefox (tried with: Chrome 119.0.6045.200, Firefox 120.0 and 91.0.1esr)

Steps to reproduce the behavior

  1. Click on the dropdown field;
  2. Search : try 1240 (at this stage the height of the list is good);
  3. Click outside the dropdown;
  4. Click on the dropdown field;

Result : You have a list with one item (Country 1240) but the height of the list is too big.

image

Expected behavior

  1. Click on the dropdown field;
  2. Search : try 1240 (at this stage the height of the list is good);
  3. Click outside the dropdown;
  4. Click on the dropdown field;

Result : You have a list with one item (Country 1240) and the height of the list is adjusted well.

@lak357 lak357 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 5, 2023
@lak357
Copy link
Author

lak357 commented Feb 5, 2024

The problem is still present with version 17.5.0.

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap?
Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants