diff --git a/packages/@react-stately/combobox/src/useComboBoxState.ts b/packages/@react-stately/combobox/src/useComboBoxState.ts index 54838afb8d9..bb897667f9e 100644 --- a/packages/@react-stately/combobox/src/useComboBoxState.ts +++ b/packages/@react-stately/combobox/src/useComboBoxState.ts @@ -10,8 +10,8 @@ * governing permissions and limitations under the License. */ +import {ChangeValueType, ComboBoxProps, MenuTriggerAction, SelectionMode, ValueType} from '@react-types/combobox'; import {Collection, CollectionStateBase, FocusStrategy, Key, Node, Selection} from '@react-types/shared'; -import {ComboBoxProps, MenuTriggerAction, SelectionMode, ValueType} from '@react-types/combobox'; import {FormValidationState, useFormValidationState} from '@react-stately/form'; import {getChildNodes} from '@react-stately/collections'; import {ListCollection, ListState, useListState} from '@react-stately/list'; @@ -373,7 +373,7 @@ export function useComboBoxState = M extends 'single' ? Key | null : Key[]; +export type ValueType = M extends 'single' ? Key | null : readonly Key[]; +export type ChangeValueType = M extends 'single' ? Key | null : Key[]; type ValidationType = M extends 'single' ? Key : Key[]; export interface ComboBoxValidationValue { @@ -50,7 +51,7 @@ export interface ComboBoxValidationValue { inputValue: string } -export interface ComboBoxProps extends CollectionBase, InputBase, ValueBase>, TextInputBase, Validation, FocusableProps, LabelableProps, HelpTextProps { +export interface ComboBoxProps extends CollectionBase, InputBase, ValueBase, ChangeValueType>, TextInputBase, Validation, FocusableProps, LabelableProps, HelpTextProps { /** The list of ComboBox items (uncontrolled). */ defaultItems?: Iterable, /** The list of ComboBox items (controlled). */