From 0b2d4b473c175edb2739f64dcc9555c1a589b938 Mon Sep 17 00:00:00 2001 From: Thiago Brezinski Date: Wed, 30 Aug 2023 19:36:29 +0100 Subject: [PATCH] fix(selection-list): make showTooltip required --- src/components/SelectionList/BaseSelectionList.js | 1 - src/components/SelectionList/UserListItem.js | 2 +- src/components/SelectionList/selectionListPropTypes.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/SelectionList/BaseSelectionList.js b/src/components/SelectionList/BaseSelectionList.js index 81d486b38b7e..d5cd96b9b029 100644 --- a/src/components/SelectionList/BaseSelectionList.js +++ b/src/components/SelectionList/BaseSelectionList.js @@ -266,7 +266,6 @@ function BaseSelectionList({ isFocused={isFocused} isDisabled={isDisabled} onSelectRow={() => selectRow(item, index)} - showTooltip={showTooltip} /> ); }; diff --git a/src/components/SelectionList/UserListItem.js b/src/components/SelectionList/UserListItem.js index 0b3c05d6b752..dd90fc750510 100644 --- a/src/components/SelectionList/UserListItem.js +++ b/src/components/SelectionList/UserListItem.js @@ -16,7 +16,7 @@ import themeColors from '../../styles/themes/default'; import Tooltip from '../Tooltip'; import UserDetailsTooltip from '../UserDetailsTooltip'; -function UserListItem({item, isFocused = false, showTooltip = false, onSelectRow, onDismissError = () => {}}) { +function UserListItem({item, isFocused = false, showTooltip, onSelectRow, onDismissError = () => {}}) { const hasError = !_.isEmpty(item.errors); const avatar = ( diff --git a/src/components/SelectionList/selectionListPropTypes.js b/src/components/SelectionList/selectionListPropTypes.js index 9946e3bfcc35..501de8314934 100644 --- a/src/components/SelectionList/selectionListPropTypes.js +++ b/src/components/SelectionList/selectionListPropTypes.js @@ -47,7 +47,7 @@ const userListItemPropTypes = { isFocused: PropTypes.bool, /** Whether this item should show Tooltip */ - showTooltip: PropTypes.bool, + showTooltip: PropTypes.bool.isRequired, /** Callback to fire when the item is pressed */ onSelectRow: PropTypes.func.isRequired,