Skip to content

Commit

Permalink
Merge pull request #5051 from systeminit/fix/BUG-694-deselect-compone…
Browse files Browse the repository at this point in the history
…nt-when-adding-to-diagram

Fix: de-select component when adding to the diagram
  • Loading branch information
jobelenus authored Dec 2, 2024
2 parents 2dae67c + 7df0874 commit d281749
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/web/src/components/AssetPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ import { SchemaVariant } from "@/api/sdf/dal/schema";
import NodeSkeleton from "@/components/NodeSkeleton.vue";
import SidebarSubpanelTitle from "@/components/SidebarSubpanelTitle.vue";
import EditingPill from "@/components/EditingPill.vue";
import { useViewsStore } from "@/store/views.store";
const searchRef = ref<InstanceType<typeof SiSearch>>();
const componentsStore = useComponentsStore();
const viewStore = useViewsStore();
const assetStore = useAssetStore();
const schemasReqStatus = assetStore.getRequestStatus(
Expand Down Expand Up @@ -310,6 +312,8 @@ function onSelect(id: string, e: MouseEvent) {
if (componentsStore.selectedInsertCategoryVariantId === id) {
componentsStore.cancelInsert();
} else {
// disable current selection when drag & drop a component
viewStore.setSelectedComponentId(null);
componentsStore.setInsertSchema(id);
if (e) {
nextTick(() => {
Expand Down

0 comments on commit d281749

Please sign in to comment.