mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 04:48:51 +00:00
fix: edit & remove buttons issue after category switch
This commit is contained in:
parent
0f9205db63
commit
888ac5715b
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
7
package-lock.json
generated
7
package-lock.json
generated
@ -7,6 +7,7 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "hexabot",
|
"name": "hexabot",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
"license": "AGPL-3.0-only",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"frontend",
|
"frontend",
|
||||||
"widget"
|
"widget"
|
||||||
@ -19,7 +20,8 @@
|
|||||||
},
|
},
|
||||||
"frontend": {
|
"frontend": {
|
||||||
"name": "hexabot-ui",
|
"name": "hexabot-ui",
|
||||||
"version": "0.1.0",
|
"version": "2.0.0",
|
||||||
|
"license": "AGPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chatscope/chat-ui-kit-react": "^2.0.3",
|
"@chatscope/chat-ui-kit-react": "^2.0.3",
|
||||||
"@chatscope/chat-ui-kit-styles": "^1.4.0",
|
"@chatscope/chat-ui-kit-styles": "^1.4.0",
|
||||||
@ -9802,7 +9804,8 @@
|
|||||||
},
|
},
|
||||||
"widget": {
|
"widget": {
|
||||||
"name": "hexabot-widget",
|
"name": "hexabot-widget",
|
||||||
"version": "0.0.0",
|
"version": "2.0.0",
|
||||||
|
"license": "AGPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/emoji-js": "^3.5.2",
|
"@types/emoji-js": "^3.5.2",
|
||||||
"autolinker": "^4.0.0",
|
"autolinker": "^4.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user