[combobox] Return highlight to selected item on query clear#5232
Draft
atomiks wants to merge 18 commits into
Draft
[combobox] Return highlight to selected item on query clear#5232atomiks wants to merge 18 commits into
atomiks wants to merge 18 commits into
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,187.46 ms -183.18 ms(-13.4%) | Renders: 76 (▼-2) | Paint: 1,875.98 ms -247.25 ms(-11.6%)
11 tests within noise — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
083f7b2 to
8b9b57e
Compare
f66720b to
e644b7f
Compare
2c570eb to
ff3f9f6
Compare
ff3f9f6 to
9d1cef7
Compare
Keep direct-item cleanup attached to the live registry and queue restoration only after input clears are accepted. Synchronize the settled element before navigation scrolls it.
# Conflicts: # .github/workflows/ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5227
Supersedes #5148.
Clearing a query replaces the filtered item tree while the selected item must be highlighted and scrolled back into view. The old registry committed refs, values, labels, and indexes separately, so a Combobox-only retry could still navigate using partially updated data.
Composite now publishes one settled, index-addressed item snapshot. This also covers #5148: explicitly indexed non-virtualized items remain registered for pointer navigation, lifecycle resets repopulate the element registry, and explicit and automatic indexes can safely coexist by reserving explicit slots. These belong together because both features require the same atomic registry invariant.
Changes
Measurements