@@ -82,7 +82,13 @@ export const DocumentView = () => {
8282 if ( documentClasses ) {
8383 setBarLoading ( false )
8484 }
85- } , [ documentClasses ] )
85+ } , [ documentClasses ] )
86+
87+ /*useEffect(() => {
88+ if(!perDocumentCount) return
89+ if(!documentClasses) return
90+ setBarLoading(false)
91+ }, [documentObjectWithFrames.update])*/
8692
8793 useEffect ( ( ) => {
8894 setBarLoading ( true )
@@ -110,6 +116,7 @@ export const DocumentView = () => {
110116
111117 function extractDocuments ( documentResults ) {
112118 var extractedResults = [ ]
119+
113120 documentResults . map ( item => {
114121 var newJson = { }
115122 for ( var key in item ) {
@@ -124,15 +131,18 @@ export const DocumentView = () => {
124131 newJson [ key ] = newArray
125132 }
126133 }
127- else if ( item [ key ] [ "@id" ] ) { // object
128- newJson [ key ] = item [ key ] [ "@id" ]
134+ else if ( typeof item [ key ] === "object" ) {
135+ if ( item [ key ] . hasOwnProperty ( "@id" ) ) { // object - we do not display sys json data as part of table
136+ newJson [ key ] = item [ key ] [ "@id" ]
137+ }
129138 }
130139 else {
131140 newJson [ key ] = item [ key ]
132141 }
133142 }
134143 extractedResults . push ( newJson )
135144 } )
145+ //console.log("extractedResults", extractedResults)
136146 return extractedResults
137147 }
138148
@@ -188,7 +198,6 @@ export const DocumentView = () => {
188198 } )
189199 }
190200
191-
192201 if ( barloading ) {
193202 var message
194203 if ( ! documentObjectWithFrames . action ) message = `Fetching documents of ${ dataProduct } `
@@ -197,8 +206,6 @@ export const DocumentView = () => {
197206 return < Loading message = { message } />
198207 }
199208
200- //console.log("documentResults", documentResults)
201-
202209 if ( ! actionControl . read && ! actionControl . write ) {
203210 // info reader access control
204211 return < React . Fragment >
@@ -286,6 +293,7 @@ export const DocumentView = () => {
286293 documentObjectWithFrames . update &&
287294 < DocumentFrames /> }
288295
296+
289297 </ Row >
290298 </ React . Fragment >
291299
0 commit comments