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

Dropdown - scroll to selected item #10346

Closed
martinkasa opened this issue Jun 18, 2021 · 2 comments
Closed

Dropdown - scroll to selected item #10346

martinkasa opened this issue Jun 18, 2021 · 2 comments
Assignees
Labels
LTS-FIXED-10.1.5 Fixed in PrimeNG LTS 10.1.5 LTS-FIXED-11.4.8 Fixed in PrimeNG LTS 11.4.8 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@martinkasa
Copy link

Plunkr Case (Bug Reports)

https://stackblitz.com/edit/github-yqtqpy-edcngr

Current behavior
When you open the dropdown, selected item is not in visible area

Expected behavior
Selected item should be in scrolled visible area.

  • Angular version: 11

  • PrimeNG version: 11.3

  • Browser: Chrome, Firefox

Possible issue:
From my observation, the issue seems to be connected to opening animation. At the beginning of the animation, DomHandler.scrollInView... is called. It measures dropdown panel and selected item position and set scroll height. But after this calculation, dropdown panel is expanded from 80% of height to 100%, so calculation was done on wrong height of the panel (80% instead of final 100%).

@yigitfindikli yigitfindikli added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jun 18, 2021
@yigitfindikli yigitfindikli added this to the 12.Future milestone Jun 18, 2021
@yigitfindikli yigitfindikli self-assigned this Jun 18, 2021
@vladovelichkovski
Copy link

Any ETA for this? It is really annoing.

@wvdhaute
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-10.1.5 Fixed in PrimeNG LTS 10.1.5 LTS-FIXED-11.4.8 Fixed in PrimeNG LTS 11.4.8 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

4 participants