Skip to content

Commit 0273068

Browse files
author
Joel Bettner
authored
Merge pull request #23717 from jayeshmangwani/make_PressableWithDelayToggle_innerRef_optional
[NoQA] Fix: console warning by making innerRef optional to PressableWithDelayToggle
2 parents d051341 + f1b43f5 commit 0273068

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/Pressable/PressableWithDelayToggle.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import useThrottledButtonState from '../../hooks/useThrottledButtonState';
1313

1414
const propTypes = {
1515
/** Ref passed to the component by React.forwardRef (do not pass from parent) */
16-
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]).isRequired,
16+
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]),
1717

1818
/** The text to display */
1919
text: PropTypes.string,
@@ -67,6 +67,7 @@ const defaultProps = {
6767
icon: null,
6868
inline: true,
6969
iconChecked: Expensicons.Checkmark,
70+
innerRef: () => {},
7071
};
7172

7273
function PressableWithDelayToggle(props) {

0 commit comments

Comments
 (0)