Skip to content

Commit 362eaf6

Browse files
committed
Merge branch 'newDoc' of https://github.com/terminusdb/terminusdb-dashboard into newDoc
2 parents 9619b29 + 5c35832 commit 362eaf6

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

packages/tdb-documents-ui-template/src/hook/useTDBDocuments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export const useTDBDocuments = (woqlClient) => {
182182
return true
183183
}catch(err){
184184
//display conflict
185-
setSelectedDocument(jsonDoc)
185+
setSelectedDocument(jsonDocument)
186186
setError(err.data || {message:err.message})
187187
}finally{setLoading(false)}
188188
}

packages/tdb-documents-ui/src/components/EditDocumentLink.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,13 @@ const assignDepth = (data, depth = 0 , propertyLink) => {
151151
depth += 1
152152
return assignDepth(data[propertyLink], depth, propertyLink)
153153
}
154-
return depth
154+
return depth
155155
};
156156

157157
function getAction (formData, unfoldable) {
158158
if(!formData) return false
159-
if(unfoldable &&
160-
typeof formData === CONST.OBJECT_TYPE) return CONST.LINK_NEW_DOCUMENT
161-
return CONST.LINK_EXISTING_DOCUMENT
159+
if(typeof formData === CONST.STRING_TYPE) return CONST.LINK_EXISTING_DOCUMENT
160+
return CONST.LINK_NEW_DOCUMENT
162161
}
163162

164163
const EditHelper = ({ linked_to, cardKey, setDeleteLink, clickedUnlinked }) => {

packages/tdb-documents-ui/src/widgets/oneOfDocumentsWidget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function getSelected(oneOfDocumentData, oneOf) {
168168
}
169169
return false
170170
}
171-
171+
172172
export const TDBOneOfDocuments = ({ args, props, property, id, setOneOfDocumentData, oneOfDocumentData }) => {
173173

174174
let { documentFrame, mode } = args

0 commit comments

Comments
 (0)