Skip to content

Commit

Permalink
fix subdocument in result (#289)
Browse files Browse the repository at this point in the history
Co-authored-by: Francesca-Bit <francesca@terminusdb.com>
  • Loading branch information
Francesca-Bit and Francesca-Bit committed Jul 26, 2023
1 parent 45730fc commit 20dfa3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/tdb-dashboard/src/pages/FreeTextSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ function SearchDocument ({documentID}){
<Button onClick={navigateToDoc}>Manage Document</Button>
</Stack>
{Object.keys(selectedDocument).map(key=>{
let value = selectedDocument[key]
if(value && typeof value === "object"){
value = JSON.stringify(value)
}
return<Stack direction="horizontal" gap={2} >
<p class="font-weight-bold text-success">{key}: </p><p class="font-weight-bold">{selectedDocument[key]}</p>
<p class="font-weight-bold text-success">{key}: </p><p class="font-weight-bold">{value}</p>
</Stack>
})}
</React.Fragment>}
Expand Down

0 comments on commit 20dfa3d

Please sign in to comment.