Skip to content

Commit cc6d6a9

Browse files
lixiaoyanclaude
andauthored
fix: pass selection mode generic to ComboBox validate type (adobe#9795)
ComboBoxProps was using `Validation<ComboBoxValidationValue>` without passing the `M` generic, so the validate callback's `value` field was always typed as `Key` (single mode) even with `selectionMode="multiple"`. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 29a5d0e commit cc6d6a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-types/combobox/src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface ComboBoxValidationValue<M extends SelectionMode = 'single'> {
5151
inputValue: string
5252
}
5353

54-
export interface ComboBoxProps<T, M extends SelectionMode = 'single'> extends CollectionBase<T>, InputBase, ValueBase<ValueType<M>, ChangeValueType<M>>, TextInputBase, Validation<ComboBoxValidationValue>, FocusableProps<HTMLInputElement>, LabelableProps, HelpTextProps {
54+
export interface ComboBoxProps<T, M extends SelectionMode = 'single'> extends CollectionBase<T>, InputBase, ValueBase<ValueType<M>, ChangeValueType<M>>, TextInputBase, Validation<ComboBoxValidationValue<M>>, FocusableProps<HTMLInputElement>, LabelableProps, HelpTextProps {
5555
/** The list of ComboBox items (uncontrolled). */
5656
defaultItems?: Iterable<T>,
5757
/** The list of ComboBox items (controlled). */

0 commit comments

Comments
 (0)