Skip to content

Commit ee9f4e0

Browse files
committed
fix subdocument in result
1 parent 03152e0 commit ee9f4e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/tdb-dashboard/src/pages/FreeTextSearch.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ function SearchDocument ({documentID}){
162162
<Button onClick={navigateToDoc}>Manage Document</Button>
163163
</Stack>
164164
{Object.keys(selectedDocument).map(key=>{
165+
let value = selectedDocument[key]
166+
if(value && typeof value === "object"){
167+
value = JSON.stringify(value)
168+
}
165169
return<Stack direction="horizontal" gap={2} >
166-
<p class="font-weight-bold text-success">{key}: </p><p class="font-weight-bold">{selectedDocument[key]}</p>
170+
<p class="font-weight-bold text-success">{key}: </p><p class="font-weight-bold">{value}</p>
167171
</Stack>
168172
})}
169173
</React.Fragment>}

0 commit comments

Comments
 (0)