Skip to content

Simplify Select component by removing dropdown toggle behavior#99

Merged
LittleLittleCloud merged 2 commits intou/xiaoyun/improveSelectfrom
copilot/sub-pr-98
Nov 6, 2025
Merged

Simplify Select component by removing dropdown toggle behavior#99
LittleLittleCloud merged 2 commits intou/xiaoyun/improveSelectfrom
copilot/sub-pr-98

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

The Select component had dropdown toggle functionality with _isOpen state management, but the refactoring intent was to always display all options as a simple list selector.

Changes

  • Removed dropdown toggle logic: Deleted _isOpen field, ToggleDropdownAsync(), EnsureOpen(), and IsToggleKey() methods
  • Simplified keyboard handling: Removed space/toggle key handling; Enter commits selection, Escape resets highlight to current value
  • Cleaned up navigation: TryMoveSelection() and TryTypeAhead() no longer return "opened" state since options are always visible
  • Removed click-to-toggle: Removed @onclick handler from container div

The component now behaves as a permanently visible list where arrow keys navigate, Enter selects, and Escape cancels.

<Select Options="@(new[] { "Align", "Border", "Columns", "Panel", "Select", "Text Input" })"
        @bind-Value="Select"
        Expand="true" />

Select component showing always-visible options


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor select component to remove dropdown behavior Simplify Select component by removing dropdown toggle behavior Nov 6, 2025
@LittleLittleCloud LittleLittleCloud marked this pull request as ready for review November 6, 2025 02:22
@LittleLittleCloud LittleLittleCloud merged commit 19bf54c into u/xiaoyun/improveSelect Nov 6, 2025
@LittleLittleCloud LittleLittleCloud deleted the copilot/sub-pr-98 branch November 6, 2025 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants