mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 12:59:14 +00:00
fix(frontend): add disabled attribute for category delete button
This commit is contained in:
parent
1398250e58
commit
7a19ba67e5
@ -156,12 +156,9 @@ export const Categories = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
) : null}
|
) : null}
|
||||||
{selectedCategories.length > 0 && (
|
|
||||||
<Grid item>
|
|
||||||
<Button
|
<Button
|
||||||
startIcon={<DeleteIcon />}
|
|
||||||
variant="contained"
|
|
||||||
color="error"
|
color="error"
|
||||||
|
variant="contained"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
const isConfirmed = await dialogs.confirm(
|
const isConfirmed = await dialogs.confirm(
|
||||||
<ConfirmDialogBody
|
<ConfirmDialogBody
|
||||||
@ -174,12 +171,12 @@ export const Categories = () => {
|
|||||||
deleteCategories(selectedCategories);
|
deleteCategories(selectedCategories);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
disabled={!selectedCategories.length}
|
||||||
|
startIcon={<DeleteIcon />}
|
||||||
>
|
>
|
||||||
{t("button.delete")}
|
{t("button.delete")}
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
)}
|
|
||||||
</Grid>
|
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
|
Loading…
Reference in New Issue
Block a user