Skip to content

chore: [DHIS2-21515] Improve performance for large option sets in SingleSelectField#4572

Open
henrikmv wants to merge 4 commits into
masterfrom
hv/chore/DHIS2-21515_single-select-field-windowing
Open

chore: [DHIS2-21515] Improve performance for large option sets in SingleSelectField#4572
henrikmv wants to merge 4 commits into
masterfrom
hv/chore/DHIS2-21515_single-select-field-windowing

Conversation

@henrikmv
Copy link
Copy Markdown
Contributor

@henrikmv henrikmv commented May 18, 2026

DHIS2-21515

This change introduces incremental client-side rendering using the onEndReached prop already exposed by @dhis2/ui's SimpleSingleSelect. Options remain fully in-memory (no server-side change), but only a window is mounted at a time:

  • Activates only when filteredOptions.length > 200; smaller option sets render as before.
  • Renders the first 100 options initially; onEndReached appends another 100 as the user scrolls.
  • Window resets to the first 100 on every filter change so search results always start from the top.
  • Selected value is still resolved against the full options array, so it displays correctly even when outside the rendered window.

@henrikmv henrikmv marked this pull request as ready for review May 18, 2026 09:28
@henrikmv henrikmv requested a review from a team as a code owner May 18, 2026 09:28
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

@henrikmv henrikmv added testing and removed testing labels May 18, 2026
@sonarqubecloud
Copy link
Copy Markdown

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants