mirror of
https://github.com/hexastack/hexabot
synced 2025-03-16 10:28:54 +00:00
fix: callback function condition
This commit is contained in:
parent
5576b151a8
commit
d7edfdf384
@ -135,12 +135,14 @@ export const Categories = () => {
|
|||||||
<DeleteDialog
|
<DeleteDialog
|
||||||
{...deleteDialogCtl}
|
{...deleteDialogCtl}
|
||||||
callback={async () => {
|
callback={async () => {
|
||||||
|
if (selectedCategories.length > 0) {
|
||||||
|
deleteCategories(selectedCategories), setSelectedCategories([]);
|
||||||
|
deleteDialogCtl.closeDialog();
|
||||||
|
}
|
||||||
if (deleteDialogCtl?.data) {
|
if (deleteDialogCtl?.data) {
|
||||||
if (selectedCategories.length > 0) {
|
{
|
||||||
deleteCategories(selectedCategories), setSelectedCategories([]);
|
|
||||||
deleteDialogCtl.closeDialog();
|
|
||||||
} else {
|
|
||||||
deleteCategory(deleteDialogCtl.data);
|
deleteCategory(deleteDialogCtl.data);
|
||||||
|
deleteDialogCtl.closeDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user