Skip to content

Commit 88c80f2

Browse files
committed
chore: add relevant comment
1 parent d5bba8d commit 88c80f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PickerInput/Selector/hooks/useInputProps.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ export default function useInputProps<DateType extends object = any>(
185185
return;
186186
}
187187

188+
// Handle intentional clearing: when text is empty, trigger onChange with null
188189
if (text === '') {
189-
onInvalid(false, index);
190+
onInvalid(false, index); // Reset invalid state before clearing the value
190191
onChange(null, index);
191192
return;
192193
}

0 commit comments

Comments
 (0)