fix: edit & remove buttons issue after category switch

This commit is contained in:
DDibyajyot 2024-09-17 10:59:32 +01:00
parent 0f9205db63
commit 888ac5715b
2 changed files with 6 additions and 3 deletions

View File

@ -48,7 +48,6 @@ import { IBlock } from "@/types/block.types";
import { ICategory } from "@/types/category.types";
import { BlockPorts } from "@/types/visual-editor.types";
import BlockDialog from "../BlockDialog";
import { ZOOM_LEVEL } from "../constants";
import { useVisualEditor } from "../hooks/useVisualEditor";
@ -141,6 +140,7 @@ const Diagrams = () => {
if (id) {
setSelectedCategoryId?.(id);
setSelectedBlockId(undefined); // Reset selected block when switching categories, resetting edit & remove buttons
}
}
};

7
package-lock.json generated
View File

@ -7,6 +7,7 @@
"": {
"name": "hexabot",
"version": "2.0.0",
"license": "AGPL-3.0-only",
"workspaces": [
"frontend",
"widget"
@ -19,7 +20,8 @@
},
"frontend": {
"name": "hexabot-ui",
"version": "0.1.0",
"version": "2.0.0",
"license": "AGPL-3.0-only",
"dependencies": {
"@chatscope/chat-ui-kit-react": "^2.0.3",
"@chatscope/chat-ui-kit-styles": "^1.4.0",
@ -9802,7 +9804,8 @@
},
"widget": {
"name": "hexabot-widget",
"version": "0.0.0",
"version": "2.0.0",
"license": "AGPL-3.0-only",
"dependencies": {
"@types/emoji-js": "^3.5.2",
"autolinker": "^4.0.0",