Skip to content

Commit bced8ba

Browse files
committed
make field selected
1 parent 1c7a57f commit bced8ba

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 { addFieldToJSONSchema, getNewUnusedFieldName } from '../utils/schema';
@@ -387,6 +384,13 @@ const updateSelectedItemsFromAppliedEdit = (
387384
id: edit.ns,
388385
};
389386
}
387+
case 'AddField': {
388+
return {
389+
type: 'field',
390+
namespace: edit.ns,
391+
fieldPath: edit.field,
392+
};
393+
}
390394
}
391395

392396
return currentSelection;

0 commit comments

Comments
 (0)