update record to model in core
This commit is contained in:
parent
50abaa4988
commit
672bd8b945
|
@ -65,14 +65,14 @@ export const getPotentialReverseReferenceIndexes = (hierarchy, refIndex) => {
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getPotentialReferenceIndexes = (hierarchy, record) =>
|
export const getPotentialReferenceIndexes = (hierarchy, model) =>
|
||||||
pipe(hierarchy, [
|
pipe(hierarchy, [
|
||||||
hierarchyFunctions.getFlattenedHierarchy,
|
hierarchyFunctions.getFlattenedHierarchy,
|
||||||
filter(hierarchyFunctions.isAncestorIndex),
|
filter(hierarchyFunctions.isAncestorIndex),
|
||||||
filter(
|
filter(
|
||||||
i =>
|
i =>
|
||||||
hierarchyFunctions.isAncestor(record)(i.parent()) ||
|
hierarchyFunctions.isAncestor(model)(i.parent()) ||
|
||||||
i.parent().nodeId === record.parent().nodeId ||
|
i.parent().nodeId === model.parent().nodeId ||
|
||||||
hierarchyFunctions.isRoot(i.parent())
|
hierarchyFunctions.isRoot(i.parent())
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue