File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
packages/compass-data-modeling/src/components Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -109,20 +109,15 @@ const DiagramContent: React.FunctionComponent<{
109109 selectedItems,
110110} ) => {
111111 const isDarkMode = useDarkMode ( ) ;
112- const diagramContainerRef = useRef < HTMLDivElement | null > ( null ) ;
113112 const diagram = useRef ( useDiagram ( ) ) ;
114113 const { openDrawer } = useDrawerActions ( ) ;
115114
116- const setDiagramContainerRef = useCallback (
117- ( ref : HTMLDivElement | null ) => {
118- if ( ref ) {
119- // For debugging purposes, we attach the diagram to the ref.
120- ( ref as any ) . _diagram = diagram ;
121- }
122- diagramContainerRef . current = ref ;
123- } ,
124- [ diagram ]
125- ) ;
115+ const setDiagramContainerRef = useCallback ( ( ref : HTMLDivElement | null ) => {
116+ if ( ref ) {
117+ // For debugging purposes, we attach the diagram to the ref.
118+ ( ref as any ) . _diagram = diagram . current ;
119+ }
120+ } , [ ] ) ;
126121
127122 const edges = useMemo < EdgeProps [ ] > ( ( ) => {
128123 return ( model ?. relationships ?? [ ] ) . map ( ( relationship ) => {
You can’t perform that action at this time.
0 commit comments