Skip to content

Commit f48bde6

Browse files
committed
make field selected
1 parent 10d7147 commit f48bde6

File tree

1 file changed

+8
-4
lines changed
  • packages/compass-data-modeling/src/store

1 file changed

+8
-4
lines changed

packages/compass-data-modeling/src/store/diagram.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ import {
2727
} from '../services/open-and-download-diagram';
2828
import type { MongoDBJSONSchema } from 'mongodb-schema';
2929
import { getCoordinatesForNewNode } from '@mongodb-js/diagramming';
30-
import {
31-
collectionToBaseNodeForLayout,
32-
collectionToDiagramNode,
33-
} from '../utils/nodes-and-edges';
30+
import { collectionToBaseNodeForLayout } from '../utils/nodes-and-edges';
3431
import toNS from 'mongodb-ns';
3532
import { traverseSchema } from '../utils/schema-traversal';
3633
import { applyEdit as _applyEdit } from './apply-edit';
@@ -398,6 +395,13 @@ const updateSelectedItemsFromAppliedEdit = (
398395
],
399396
};
400397
}
398+
case 'AddField': {
399+
return {
400+
type: 'field',
401+
namespace: edit.ns,
402+
fieldPath: edit.field,
403+
};
404+
}
401405
}
402406

403407
return currentSelection;

0 commit comments

Comments
 (0)