Skip to content

Commit 2c4e5e7

Browse files
authored
Picker fix for validateForm (#2661)
1 parent d2d7e85 commit 2c4e5e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/picker/helpers/useImperativePickerHandle.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const useImperativePickerHandle = (ref: React.Ref<any>,
66
expandableRef: React.MutableRefObject<ExpandableOverlayMethods | null>) => {
77
const pickerRef = useRef<TextFieldMethods>();
88
useImperativeHandle(ref, () => {
9-
const {isFocused, focus, blur, clear, validate} = pickerRef.current ?? {};
9+
const {isFocused, focus, blur, clear, validate, isValid} = pickerRef.current ?? {};
1010
// @ts-expect-error useRef return type is possible null therefor it throw TS error
1111
const {openExpandable, closeExpandable, toggleExpandable} = expandableRef.current;
1212

@@ -16,6 +16,7 @@ const useImperativePickerHandle = (ref: React.Ref<any>,
1616
blur,
1717
clear,
1818
validate,
19+
isValid,
1920
openExpandable,
2021
closeExpandable,
2122
toggleExpandable

0 commit comments

Comments
 (0)