Fixed a few bugs and applied some optimizations to ValueSelect#483
Open
Fixed a few bugs and applied some optimizations to ValueSelect#483
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the ValueSelect Blazor component and its supporting JS to fix selection/highlight behavior, improve keyboard interaction, and reduce DOM/event-handler overhead.
Changes:
- Refactors item selection/highlighting to be derived from parent state (instead of cached per-item fields) and adds a
ClearAll()pathway. - Improves dropdown JS behavior (query selectors for selected/highlighted items, correct style reset, and abortable event listeners with an explicit unregister).
- Updates ARIA attributes for combobox/listbox semantics (moving
aria-expandedhandling to the input, addingaria-multiselectable, etc.).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/EventLogExpert/wwwroot/js/dropdowns.js |
Adds abortable dropdown event wiring/unwiring and streamlines scroll-to-selected/highlighted logic. |
src/EventLogExpert/Shared/Components/ValueSelectItem.razor.cs |
Removes cached selection flag; selection/highlight are now computed from parent state; updates ClearItem behavior. |
src/EventLogExpert/Shared/Components/ValueSelectItem.razor |
Adjusts ARIA and highlighted attribute rendering to match new JS selectors and accessibility intent. |
src/EventLogExpert/Shared/Components/ValueSelect.razor.cs |
Adds IAsyncDisposable cleanup, ClearAll(), selection state syncing, and keyboard/navigation fixes. |
src/EventLogExpert/Shared/Components/ValueSelect.razor |
Updates combobox/listbox ARIA attributes and multiselect semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.