fix(editor): Hide node toolbar on AddNodes node type (#14317)

This commit is contained in:
Alex Grozav
2025-04-01 14:59:53 +03:00
committed by GitHub
parent 4a95035b3a
commit a245a5ca61

View File

@@ -288,6 +288,8 @@ provide(CanvasNodeKey, {
eventBus: canvasNodeEventBus,
});
const hasToolbar = computed(() => props.data.type !== CanvasNodeRenderType.AddNodes);
const showToolbar = computed(() => {
const target = contextMenu.target.value;
return contextMenu.isOpen && target?.source === 'node-button' && target.nodeId === id.value;
@@ -373,7 +375,7 @@ onBeforeUnmount(() => {
</template>
<CanvasNodeToolbar
v-else
v-else-if="hasToolbar"
data-test-id="canvas-node-toolbar"
:read-only="readOnly"
:class="$style.canvasNodeToolbar"