mirror of
https://github.com/hexastack/hexabot
synced 2025-02-22 20:38:32 +00:00
Merge pull request #30 from DDibyajyot/fix/edit-remove-buttons
fix: [BUG] #25 -Edit & Remove Buttons stay active after category switch
This commit is contained in:
commit
fb427effaa
@ -48,7 +48,6 @@ import { IBlock } from "@/types/block.types";
|
|||||||
import { ICategory } from "@/types/category.types";
|
import { ICategory } from "@/types/category.types";
|
||||||
import { BlockPorts } from "@/types/visual-editor.types";
|
import { BlockPorts } from "@/types/visual-editor.types";
|
||||||
|
|
||||||
|
|
||||||
import BlockDialog from "../BlockDialog";
|
import BlockDialog from "../BlockDialog";
|
||||||
import { ZOOM_LEVEL } from "../constants";
|
import { ZOOM_LEVEL } from "../constants";
|
||||||
import { useVisualEditor } from "../hooks/useVisualEditor";
|
import { useVisualEditor } from "../hooks/useVisualEditor";
|
||||||
@ -141,6 +140,7 @@ const Diagrams = () => {
|
|||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
setSelectedCategoryId?.(id);
|
setSelectedCategoryId?.(id);
|
||||||
|
setSelectedBlockId(undefined); // Reset selected block when switching categories, resetting edit & remove buttons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user