feat: multi-select mode#24
Merged
Merged
Conversation
Space toggles the highlighted item; Enter confirms the full selection via onConfirm. defaultSelectedKeys pre-populates checked state. onToggle fires on each individual toggle. Hotkeys are disabled in multi-select mode to avoid Space ambiguity. DefaultIndicatorComponent renders [x]/[ ] checkboxes when isChecked is provided. isChecked is threaded through to both custom indicatorComponent and itemComponent. 13 new tests cover all paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Summary
multipleprop to enable multi-select mode: Space toggles, Enter confirmsdefaultSelectedKeyspre-populates checked state from a list of item keysonConfirm(items)called on Enter with all currently checked itemsonToggle(item, checked)called on each individual Space toggleDefaultIndicatorComponentrenders[x]/[ ]checkboxes whenisCheckedis providedisCheckedthreaded through to customindicatorComponentanditemComponentSpaceambiguityuseEnhancedSelectInputhook exposescheckedKeys: Set<string>for headless usageCloses #12
Test plan
multi-select renders checkbox indicators instead of arrow cursormulti-select space toggles checked state on/offmulti-select defaultSelectedKeys pre-checks itemsmulti-select enter calls onConfirm with checked itemsmulti-select enter with nothing checked calls onConfirm with empty arraymulti-select onToggle fires with item and checked statemulti-select space only toggles enabled itemsmulti-select hotkeys do not fire in multi-select modemulti-select hotkey hints not shown in rendermulti-select isChecked passed to custom indicatorComponentmulti-select isChecked passed to custom itemComponentDefaultIndicatorComponent renders checkboxes in multi-select mode🤖 Generated with Claude Code