diff --git a/src/components/MoneyRequestConfirmationList.js b/src/components/MoneyRequestConfirmationList.js index 3fca7f714be..f8006788bba 100755 --- a/src/components/MoneyRequestConfirmationList.js +++ b/src/components/MoneyRequestConfirmationList.js @@ -166,7 +166,6 @@ function MoneyRequestConfirmationList(props) { data: [formattedPayeePersonalDetails], shouldShow: true, indexOffset: 0, - isDisabled: true, }, { title: translate('moneyRequestConfirmationList.whoWasThere'), @@ -296,7 +295,6 @@ function MoneyRequestConfirmationList(props) { selectedOptions={selectedOptions} canSelectMultipleOptions={canModifyParticipants} disableArrowKeysActions={!canModifyParticipants} - isDisabled={!canModifyParticipants} boldStyle shouldTextInputAppearBelowOptions shouldShowTextInput={false} diff --git a/src/components/OptionRow.js b/src/components/OptionRow.js index 453e28a6271..911df881f60 100644 --- a/src/components/OptionRow.js +++ b/src/components/OptionRow.js @@ -67,7 +67,7 @@ const defaultProps = { isSelected: false, boldStyle: false, showTitleTooltip: false, - onSelectRow: () => {}, + onSelectRow: undefined, isDisabled: false, optionIsFocused: false, style: null, @@ -150,6 +150,10 @@ class OptionRow extends Component { (pressableRef = el)} onPress={(e) => { + if (!this.props.onSelectRow) { + return; + } + this.setState({isDisabled: true}); if (e) { e.preventDefault(); @@ -171,6 +175,7 @@ class OptionRow extends Component { this.props.shouldDisableRowInnerPadding ? null : styles.sidebarLinkInner, this.props.optionIsFocused ? styles.sidebarLinkActive : null, this.props.shouldHaveOptionSeparator && styles.borderTop, + !this.props.onSelectRow && !this.props.isDisabled ? styles.cursorDefault : null, ]} accessibilityLabel={this.props.option.text} accessibilityRole="button" diff --git a/src/components/OptionsList/optionsListPropTypes.js b/src/components/OptionsList/optionsListPropTypes.js index 915d84e058c..e6e507f4da0 100644 --- a/src/components/OptionsList/optionsListPropTypes.js +++ b/src/components/OptionsList/optionsListPropTypes.js @@ -88,7 +88,7 @@ const defaultProps = { hideSectionHeaders: false, disableFocusOptions: false, boldStyle: false, - onSelectRow: () => {}, + onSelectRow: undefined, headerMessage: '', innerRef: null, showTitleTooltip: false, diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index df15ad71feb..33767401210 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -305,7 +305,7 @@ class BaseOptionsSelector extends Component { (this.list = el)} optionHoveredStyle={this.props.optionHoveredStyle} - onSelectRow={this.selectRow} + onSelectRow={this.props.onSelectRow ? this.selectRow : undefined} sections={this.props.sections} focusedIndex={this.state.focusedIndex} selectedOptions={this.props.selectedOptions} diff --git a/src/components/OptionsSelector/optionsSelectorPropTypes.js b/src/components/OptionsSelector/optionsSelectorPropTypes.js index bc7436e3dba..02b807bf66c 100644 --- a/src/components/OptionsSelector/optionsSelectorPropTypes.js +++ b/src/components/OptionsSelector/optionsSelectorPropTypes.js @@ -109,7 +109,7 @@ const propTypes = { }; const defaultProps = { - onSelectRow: () => {}, + onSelectRow: undefined, textInputLabel: '', placeholderText: '', keyboardType: 'default', diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 19db6d28bb7..4db6f45e7e4 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -345,7 +345,6 @@ class WorkspaceMembersPage extends React.Component { /> this.toggleUser(item.login, item.pendingAction)} /> {(this.props.session.email === item.login || item.role === 'admin') && (