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

[ComboBox, DropDownList] Grouped data with virtual scrolling causes itemDisabled to work incorrectly #4270

Open
yanmariomenev opened this issue Apr 11, 2024 · 0 comments

Comments

@yanmariomenev
Copy link
Contributor

Describe the bug
It seems that the component might have some indexing issues when trying to disable a specific item when the ComboBox is configured to work with virtual scrolling and grouped data. It seems that disabling items that aren't initially rendered will not receive the disabled state and also moving the scroll will start disabling other items that shouldn't be disabled. Screen recording of the interaction:

Screen.Recording.2024-04-11.at.14.58.47.mov

Grapes and mangoes should be disabled, but they are not and when scrolling it seems the items with 1 to 3 indexes receive the disabled state.

When disabling an item from the initially rendered list, the behavior is a bit better, but upon scrolling it sometimes enables the item or moves the disabled state to another item.

Screen.Recording.2024-04-11.at.15.02.15.mov

This issue appears to be primarily caused by this specific configuration and the grouping of the data. When the data isn't being grouped, then the items are disabled properly without any issues.

To Reproduce
Open the following demo and follow the steps from both recordings:
https://stackblitz.com/edit/angular-syifhy?file=src%2Fapp%2Fapp.component.ts
First recording - open the list scroll down to render a new set of items and select 1 or more of them. Then slowly move the scrollbar to see the wrong placement of the disabled state.
Second recording - select the 4th item scroll down a bit and then slowly start scrolling up to the item.

@yanmariomenev yanmariomenev changed the title [ComboBox] Grouped data with virtual scrolling causes itemDisabled to work incorrectly [ComboBox, DropDownList] Grouped data with virtual scrolling causes itemDisabled to work incorrectly Apr 11, 2024
@svetq svetq self-assigned this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants