Skip to content

Commit

Permalink
Merge pull request Expensify#46128 from bernhardoj/fix/45447-delete-c…
Browse files Browse the repository at this point in the history
…onfirmation-modal-changes-when-closing-it

Fix delete modal confirmation message changes briefly when closing the modal
  • Loading branch information
robertjchen authored Aug 5, 2024
2 parents 04efea2 + f4fcc47 commit 4a558f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ function Search({queryJSON, policyIDs, isCustomQuery}: SearchProps) {
}, [isOffline, offset, queryJSON]);

const handleOnCancelConfirmModal = () => {
setSelectedTransactionsToDelete([]);
setDeleteExpensesConfirmModalVisible(false);
};

Expand Down Expand Up @@ -361,6 +360,7 @@ function Search({queryJSON, policyIDs, isCustomQuery}: SearchProps) {
isVisible={deleteExpensesConfirmModalVisible}
onConfirm={handleDeleteExpenses}
onCancel={handleOnCancelConfirmModal}
onModalHide={() => setSelectedTransactionsToDelete([])}
title={translate('iou.deleteExpense', {count: selectedTransactionsToDelete.length})}
prompt={translate('iou.deleteConfirmation', {count: selectedTransactionsToDelete.length})}
confirmText={translate('common.delete')}
Expand Down

0 comments on commit 4a558f4

Please sign in to comment.