Skip to content

Conversation

@navedqb
Copy link
Contributor

@navedqb navedqb commented Oct 30, 2025

Fixes #8355

@github-actions
Copy link

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>.

@melloware melloware added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Nov 14, 2025
Copy link
Contributor

@Coderxrohan Coderxrohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Coderxrohan
Copy link
Contributor

Coderxrohan commented Jan 3, 2026

Hey @navedqb,
Thanks for the fix 👍
CI is failing for two reasons:

  1. first, there’s an ESLint error in components/lib/multiselect/MultiSelect.js (around line ~774) where a blank line is required by the padding-line-between-statements rule;
  2. second, the PR is not properly linked to an issue. Please add the missing blank line and update the PR title, description, or commit message to reference the issue (e.g. Fixes MultiSelect: virtualScrollerOptions #8355 or Fixed MultiSelect: virtualScrollerOptions #8355). Once these are addressed, the checks should pass and I’ll re-review again.
    I liked the approach you used.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Pending Review Issue or pull request is being reviewed by Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MultiSelect: virtualScrollerOptions

5 participants