1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-11 03:34:35 +00:00

fix(web): use mui treeView instead of custom implementation

This commit is contained in:
2022-11-06 01:14:58 +05:00
parent e10a0554f0
commit c51b50428f
4 changed files with 86 additions and 85 deletions

View File

@@ -31,14 +31,24 @@ const DeleteConfirmationModal = ({
message,
_delete
}: DeleteConfirmationModalProps) => {
const handleDeleteClick = (event: React.MouseEvent) => {
event.stopPropagation()
_delete()
}
const handleClose = (event: any) => {
event.stopPropagation()
setOpen(false)
}
return (
<BootstrapDialog onClose={() => setOpen(false)} open={open}>
<BootstrapDialog onClose={handleClose} open={open}>
<DialogContent dividers>
<Typography gutterBottom>{message}</Typography>
</DialogContent>
<DialogActions>
<Button onClick={() => setOpen(false)}>Cancel</Button>
<Button color="error" onClick={() => _delete()}>
<Button onClick={handleClose}>Cancel</Button>
<Button color="error" onClick={handleDeleteClick}>
Delete
</Button>
</DialogActions>