wait for callback to finish before closing

This commit is contained in:
Abhinav-grd 2021-04-19 15:42:16 +05:30
parent 5a45867eac
commit 15437f3652

View file

@ -46,8 +46,8 @@ function ConfirmDialog({ callback, action, ...props }: Props) {
],
proceed: {
text: constants[CONFIRM_ACTION_VALUES[action]?.text],
action: () => {
callback();
action: async () => {
await callback();
props.onHide();
},
variant: CONFIRM_ACTION_VALUES[action]?.type,