Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOU Contact Preview clickable cursor issue fixed #8760

Merged
merged 5 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/IOUConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ const propTypes = {
phoneNumber: PropTypes.string,
})).isRequired,

/** Whether this is an IOU split and belongs to a group report */
isGroupSplit: PropTypes.bool.isRequired,
/** Is this IOU associated with existing report */
isIOUAttachedToExistingChatReport: PropTypes.bool.isRequired,

...windowDimensionsPropTypes,

Expand Down Expand Up @@ -225,6 +225,7 @@ class IOUConfirmationList extends Component {
data: [formattedMyPersonalDetails],
shouldShow: true,
indexOffset: 0,
isDisabled: true,
}, {
title: this.props.translate('iOUConfirmationList.whoWasThere'),
data: formattedSelectedParticipants,
Expand Down Expand Up @@ -350,6 +351,7 @@ class IOUConfirmationList extends Component {
const shouldDisableButton = selectedParticipants.length === 0 || this.props.network.isOffline;
const isLoading = this.props.iou.loading && !this.props.network.isOffline;
const recipient = this.state.participants[0];
const canModifyParticipants = this.props.isIOUAttachedToExistingChatReport && this.props.hasMultipleParticipants;
return (
<>
<ScrollView style={[styles.flexGrow0, styles.flexShrink1, styles.flexBasisAuto, styles.w100]}>
Expand All @@ -362,7 +364,7 @@ class IOUConfirmationList extends Component {
canSelectMultipleOptions={this.props.hasMultipleParticipants}
selectedOptions={this.getSelectedOptions()}
onSelectRow={toggleOption}
isDisabled={!this.props.isGroupSplit}
isDisabled={!canModifyParticipants}
optionHoveredStyle={hoverStyle}
/>
</ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion src/components/OptionsList/BaseOptionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class BaseOptionsList extends Component {
showSelectedState={this.props.canSelectMultipleOptions}
hideAdditionalOptionStates={this.props.hideAdditionalOptionStates}
forceTextUnreadStyle={this.props.forceTextUnreadStyle}
isDisabled={this.props.isDisabled}
isDisabled={this.props.isDisabled || section.isDisabled}
/>
);
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/OptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const propTypes = {

/** Whether this section should show or not */
shouldShow: PropTypes.bool,

/** Whether this section items disabled for selection */
isDisabled: PropTypes.bool,
})).isRequired,

/** Value in the search input field */
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/IOUModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ class IOUModal extends Component {
comment={this.state.comment}
onUpdateComment={this.updateComment}
iouType={this.props.iouType}
isGroupSplit={this.steps.length === 2}
isIOUAttachedToExistingChatReport={!_.isEmpty(reportID)}
/>
</AnimatedStep>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/iou/steps/IOUConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const propTypes = {
/** IOU type */
iouType: PropTypes.string,

/** Whether this is an IOU split and belongs to a group report */
isGroupSplit: PropTypes.bool.isRequired,
/** Is this IOU associated with existing report */
isIOUAttachedToExistingChatReport: PropTypes.bool.isRequired,
};

const defaultProps = {
Expand All @@ -62,7 +62,7 @@ const IOUConfirmPage = props => (
onConfirm={props.onConfirm}
onSendMoney={props.onSendMoney}
iouType={props.iouType}
isGroupSplit={props.isGroupSplit}
isIOUAttachedToExistingChatReport={props.isIOUAttachedToExistingChatReport}
/>
);

Expand Down