diff --git a/src/components/TextPicker/TextSelectorModal.tsx b/src/components/TextPicker/TextSelectorModal.tsx index 66503bff5521..fe2a4b3fcdf7 100644 --- a/src/components/TextPicker/TextSelectorModal.tsx +++ b/src/components/TextPicker/TextSelectorModal.tsx @@ -21,7 +21,7 @@ function TextSelectorModal({value, description = '', onValueSelected, isVisible, onClose?.()} + onClose={onClose} onModalHide={onClose} hideModalContentWhileAnimating useNativeDriver diff --git a/src/components/TextPicker/types.ts b/src/components/TextPicker/types.ts index d032d6657cc5..b24e42c175e7 100644 --- a/src/components/TextPicker/types.ts +++ b/src/components/TextPicker/types.ts @@ -26,7 +26,7 @@ type TextSelectorModalProps = { onValueSelected?: (value: string) => void; /** Function to call when the user closes the modal */ - onClose?: () => void; + onClose: () => void; /** Whether to show the toolip text */ shouldShowTooltips?: boolean;