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

DropdownList scroll jumps to the top when adding a new data portion #4485

Open
vLutsevich opened this issue Dec 9, 2024 · 0 comments
Open

Comments

@vLutsevich
Copy link

vLutsevich commented Dec 9, 2024

Description

When loading and appending new data to an existing array, the scroll position resets to the beginning.

For ungrouped data, this behavior can be avoided by simply appending new data to the existing array. However, this approach isn't work for grouped data. To address this, we use the FixScrollTopWhenSetDataDirective in our project, though it does not completely eliminate the issue for grouped data (scroll still can ocassionally jump).

Steps To Reproduce

https://stackblitz.com/edit/angular-zqxad9

1.1 example 1 - array of object to reproduce scroll jump to top issue.

Screen.Recording.2024-12-09.at.20.35.10.mov

1.2 In our project, we developed a directive called FixScrollTopWhenSetDataDirective to resolve the scroll jump issue. This directive prevents the resetSelection method from being triggered when a dropdown list is opened.

For non-grouped data, the issue can be resolved by appending new data to the existing array. However, when grouping is required, this approach is ineffective. Therefore, the FixScrollTopWhenSetDataDirective is essential to address the incorrect behavior of the Kendo dropdown list.

example 1 - issue is fixed by FixScrollTopWhenSetDataDirective (EXPECTED BEHAVIOUR)

Screen.Recording.2024-12-09.at.20.36.52.mov

2.1 example 2 - grouped data and scroll jump issue.

2.2 example 2 - used FixScrollTopWhenSetDataDirective, but issue still occasionally happens.

Screenshots or video

Browser

Chrome

Browser version

latest

OS type

MacOS

@vLutsevich vLutsevich changed the title DropdownList scroll top issue when set data portion DropdownList scroll top issue when set new data portion Dec 10, 2024
@vLutsevich vLutsevich changed the title DropdownList scroll top issue when set new data portion DropdownList scroll jumps to the top when adding a new data portion Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant