From 986caefee56c69fcf18379474e68f7f95e5ee650 Mon Sep 17 00:00:00 2001 From: Xiaoyan Li Date: Thu, 5 Mar 2026 19:02:11 +0800 Subject: [PATCH] fix: allow null value in ComboBox validate for single selection Since ComboBox supports allowsCustomValue, the validate function can be called with an empty selection in single mode. Update ValidationType to include null for single selection to match the runtime behavior. Co-Authored-By: Claude Opus 4.6 --- packages/@react-types/combobox/src/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@react-types/combobox/src/index.d.ts b/packages/@react-types/combobox/src/index.d.ts index 734d418a88e..942d6af5703 100644 --- a/packages/@react-types/combobox/src/index.d.ts +++ b/packages/@react-types/combobox/src/index.d.ts @@ -37,7 +37,7 @@ export type MenuTriggerAction = 'focus' | 'input' | 'manual'; export type SelectionMode = 'single' | 'multiple'; 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[]; +type ValidationType = M extends 'single' ? Key | null : Key[]; export interface ComboBoxValidationValue { /**