An open source design system that's fully customizable and agent ready
TypeScript
docs(MultiSelector): scope useMultiCombobox's opening notes; Home and End with search (#7604)
Cindy Zhangb69b2df3f837
diff --git a/.changeset/hook-doc-use-multi-combobox-opening.md b/.changeset/hook-doc-use-multi-combobox-opening.mdnew file mode 100644index 0000000000..3223a0f3c3--- /dev/null+++ b/.changeset/hook-doc-use-multi-combobox-opening.md@@ -0,0 +1,7 @@+---+'@astryxdesign/core': patch+---++[docs] The `useMultiCombobox` hook docs now say that ArrowDown or ArrowUp opening the list lands on the first or last option even with `hasSearch` or a disabled end option, and that the hook still handles Home and End with `hasSearch`, so a search input that keeps those keys for the caret stops them first and relies on PageUp and PageDown.++@cixzhangdiff --git a/packages/core/src/MultiSelector/useMultiCombobox.doc.mjs b/packages/core/src/MultiSelector/useMultiCombobox.doc.mjsindex 36b8728ed2..fc6a5be340 100644--- a/packages/core/src/MultiSelector/useMultiCombobox.doc.mjs+++ b/packages/core/src/MultiSelector/useMultiCombobox.doc.mjs@@ -32,7 +32,7 @@ export const docs = {name: 'options.selectableItems',type: 'MultiSelectorOptionData[]',description:- 'The options in the same order as they render. Options with `disabled` are skipped by the navigation keys and cannot be toggled.',+ 'The options in the same order as they render. Options with `disabled` cannot be toggled and are skipped while moving through the open list; ArrowDown or ArrowUp that opens the list still lands on the first or last option.',required: true,},{@@ -72,7 +72,7 @@ export const docs = {name: 'options.hasSearch',type: 'boolean',description:- 'Whether the list has its own search field. Space then types instead of toggling, opening does not pre-highlight, Delete and Backspace edit the query, and type-to-select is off.',+ 'Whether the list has its own search field. Space then types instead of toggling, opening by a press or Enter does not pre-highlight (ArrowDown and ArrowUp still open on the first and last option), Delete and Backspace edit the query, and type-to-select is off. Home and End still jump to the first and last option, so a search input that keeps them for the caret should stop them before this handler and rely on PageUp and PageDown.',default: 'false',},{@@ -206,7 +206,7 @@ export const docsDense = {paramDescriptions: {options: 'config.','options.selectableItems':- 'options in render order; disabled ones skipped by nav, not toggleable.',+ 'options in render order; disabled ones not toggleable, skipped while moving in open list (ArrowDown/Up opening still lands first / last).','options.isOpen': 'list shown; caller owns state.','options.onOpen':'show list; return false to refuse (highlight untouched).',@@ -215,7 +215,7 @@ export const docsDense = {'options.listboxId':'listbox / grid id; option + action-cell ids derive from it.','options.hasSearch':- 'own search field: Space types, no pre-highlight, Delete / Backspace edit query, no type-to-select.',+ 'own search field: Space types, press / Enter opening does not pre-highlight (ArrowDown/Up still first / last), Delete / Backspace edit query, no type-to-select. Home / End still jump; stop them first to keep them for the caret, use PageUp / PageDown.','options.onClear':'clear all; Delete / Backspace on closed control. ignored when open or hasSearch.','options.hasValue': 'anything selected; clear skipped when false.',