@@ -98,16 +98,16 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
9898 graphType . length === 3
9999 ? queryMap . DocChunkEntities
100100 : graphType . includes ( 'Entities' ) && graphType . includes ( 'Chunks' )
101- ? queryMap . ChunksEntities
102- : graphType . includes ( 'Entities' ) && graphType . includes ( 'Document' )
103- ? queryMap . DocEntities
104- : graphType . includes ( 'Document' ) && graphType . includes ( 'Chunks' )
105- ? queryMap . DocChunks
106- : graphType . includes ( 'Entities' ) && graphType . length === 1
107- ? queryMap . Entities
108- : graphType . includes ( 'Chunks' ) && graphType . length === 1
109- ? queryMap . Chunks
110- : queryMap . Document ;
101+ ? queryMap . ChunksEntities
102+ : graphType . includes ( 'Entities' ) && graphType . includes ( 'Document' )
103+ ? queryMap . DocEntities
104+ : graphType . includes ( 'Document' ) && graphType . includes ( 'Chunks' )
105+ ? queryMap . DocChunks
106+ : graphType . includes ( 'Entities' ) && graphType . length === 1
107+ ? queryMap . Entities
108+ : graphType . includes ( 'Chunks' ) && graphType . length === 1
109+ ? queryMap . Chunks
110+ : queryMap . Document ;
111111 if ( viewPoint === 'showGraphView' ) {
112112 queryToRun = constructQuery ( newCheck , documentNo ) ;
113113 console . log ( 'inside If QueryToRun' , queryToRun ) ;
@@ -118,7 +118,7 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
118118 const session = driver ?. session ( ) ;
119119 setLoading ( true ) ;
120120 session
121- ?. run ( queryToRun , { document_name : inspectedName } )
121+ ?. run ( queryToRun , { ' document_name' : inspectedName } )
122122 . then ( ( results ) => {
123123 if ( results . records && results . records . length > 0 ) {
124124 // @ts -ignore
@@ -228,6 +228,13 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
228228 const handleZoomOut = ( ) => {
229229 nvlRef . current ?. setZoom ( nvlRef . current . getScale ( ) * 0.7 ) ;
230230 } ;
231+
232+ const onClose = ( ) => {
233+ setStatus ( 'unknown' ) ;
234+ setStatusMessage ( '' ) ;
235+ setGraphViewOpen ( false )
236+ }
237+
231238 return (
232239 < >
233240 < Dialog
@@ -239,7 +246,7 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
239246 open = { open }
240247 aria-labelledby = 'form-dialog-title'
241248 disableCloseButton = { false }
242- onClose = { ( ) => setGraphViewOpen ( false ) }
249+ onClose = { onClose }
243250 >
244251 < Dialog . Header id = 'form-dialog-title' >
245252 { headerTitle }
0 commit comments