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

Updated logic to not allow attendee deselection from bill split confirmation page. #5895

Merged
merged 3 commits into from
Oct 18, 2021
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
5 changes: 4 additions & 1 deletion src/components/IOUConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ const propTypes = {
phoneNumber: PropTypes.string,
})).isRequired,

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

...windowDimensionsPropTypes,

...withLocalizePropTypes,
Expand Down Expand Up @@ -411,7 +414,7 @@ class IOUConfirmationList extends Component {
canSelectMultipleOptions={this.props.hasMultipleParticipants}
selectedOptions={this.getSelectedOptions()}
onSelectRow={toggleOption}
disableRowInteractivity={!this.props.hasMultipleParticipants}
disableRowInteractivity={!this.props.isGroupSplit}
optionHoveredStyle={hoverStyle}
/>
</ScrollView>
Expand Down
1 change: 1 addition & 0 deletions src/pages/iou/IOUModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ class IOUModal extends Component {
onUpdateComment={this.updateComment}
iouType={this.props.iouType}
localCurrencyCode={this.props.myPersonalDetails.localCurrencyCode}
isGroupSplit={this.steps.length === 2}
/>
)}
</>
Expand Down
4 changes: 4 additions & 0 deletions src/pages/iou/steps/IOUConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ const propTypes = {

/** IOU type */
iouType: PropTypes.string,

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

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

Expand Down