AuroMenu: Support Multi-Select For Multiple Options w/ Same Value #605
StephenRiosDev
started this conversation in
Technical Research Documents
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Auro Menu Technical Reference (TRD)
This document covers all relevant module updates for supporting multi-select, multiple matching values, and enhanced selection logic using
menuService.Component:
auro-menuProvides
MenuContextsizeshapenoCheckmarkdisabledmatchWordProperties
selectedOptionsArray[menuOption]MenuContext.valueStringorArray[String{Key}]multiSelect.selectAllMatchingOptionsBooleanGetters
get selectedOptions()Returns
MenuContext.selectedOptions.get value()Returns:
Setters
set value(value: String | Array[String])Sets selected value(s) in the menu.
Logic:
valueChangeevent (viamenuService.notifyValueChange()).Multi-select behavior:
multiSelectis true:Array[String{Key}]values.selectAllMatchingOptionsistrue, all matching options for each key are selected.selectAllMatchingOptionsisfalseand there are multiple matching options, emits warning and selects first option with matching key onlymultiSelectis false:Stringvalue.selectAllMatchingOptionsistrue, all matching options for each key are selected.selectAllMatchingOptionsisfalseand there are multiple matching options, emits warning and selects first option with matching key onlyEvent Handlers
keyhandlerHandles keyboard interaction:
Subscriptions
menuService.valueChangevalueChangeevent from the menu when selection changes.Component:
auro-menuOptionConsumes
MenuContextsizeshapenoCheckmarkdisabledmatchWordProperties
valueStringkeyStringvalue. Can be overridden by user-definedkey.Methods
click()Toggles selection via the service:
updateState({ selected, highlighted })Applies state updates:
aria-selectedaccordingly.Subscriptions
menuService.stateChangeTriggers:
propertyChange.matchWordTriggers:
Service:
menuServiceManages shared menu logic and state synchronization.
State
selectedOptionsSet<MenuOption>highlightedOptionMenuOption | nullMethods
toggleOption(option)selectHighlightedOption()selectOption(option)deselectOption(option)notifyStateChange()Updates all registered options:
notifyValueChange()Emits a
valueChangeevent with selection details:selectOptionsByValue(value: String | Array[String{MenuOption.Key}])Selects options based on provided value(s).
Logic:
selectAllMatchingOptionsisfalse:selectAllMatchingOptionsistrue:selectAllMatchingOptionsisfalse:selectAllMatchingOptionsistrue:Beta Was this translation helpful? Give feedback.
All reactions