From 074915d412370b48d9888967701f3939199146b8 Mon Sep 17 00:00:00 2001 From: Jayesh Mangwani Date: Thu, 27 Jul 2023 15:48:48 +0530 Subject: [PATCH] fix: PressableWithDelayToggle innerRef optional --- src/components/Pressable/PressableWithDelayToggle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Pressable/PressableWithDelayToggle.js b/src/components/Pressable/PressableWithDelayToggle.js index 561275c0edbc..8775957987e7 100644 --- a/src/components/Pressable/PressableWithDelayToggle.js +++ b/src/components/Pressable/PressableWithDelayToggle.js @@ -13,7 +13,7 @@ import useThrottledButtonState from '../../hooks/useThrottledButtonState'; const propTypes = { /** Ref passed to the component by React.forwardRef (do not pass from parent) */ - innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]).isRequired, + innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]), /** The text to display */ text: PropTypes.string, @@ -67,6 +67,7 @@ const defaultProps = { icon: null, inline: true, iconChecked: Expensicons.Checkmark, + innerRef: () => {}, }; function PressableWithDelayToggle(props) {