fix(multiselect): prevent crash with virtualScroller when many items selected#8361
fix(multiselect): prevent crash with virtualScroller when many items selected#8361navedqb wants to merge 3 commits intoprimefaces:masterfrom
Conversation
fix(multiselect): prevent crash with virtualScroller when many items selected
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
Coderxrohan
left a comment
There was a problem hiding this comment.
Issue
MultiSelect could crash or become unstable when used with VirtualScroller and a large number of selected values due to costly lookup logic and unconditional scrolling.
Fix
Optimizes option lookup by switching to a Set-based approach when selection size is large and adds defensive checks around VirtualScroller.scrollToIndex, limiting auto-scroll when many items are selected.
Impact
Improves stability and performance for large selections while preserving existing behavior for smaller datasets.
⭐ Rating: 4.5/5
|
Hey @navedqb,
Thanks! |
Fixes #8355