better naming of default child view
This commit is contained in:
parent
84d145026b
commit
ecc649180f
|
@ -198,7 +198,10 @@ export const saveCurrentNode = store => () => {
|
||||||
const defaultIndex = templateApi(state.hierarchy).getNewIndexTemplate(
|
const defaultIndex = templateApi(state.hierarchy).getNewIndexTemplate(
|
||||||
cloned.parent()
|
cloned.parent()
|
||||||
)
|
)
|
||||||
defaultIndex.name = `all_${cloned.name}s`
|
defaultIndex.name = hierarchyFunctions.isTopLevelIndex(cloned)
|
||||||
|
? `all_${cloned.name}s`
|
||||||
|
: `${cloned.parent().name}_${cloned.name}s`
|
||||||
|
|
||||||
defaultIndex.allowedRecordNodeIds = [cloned.nodeId]
|
defaultIndex.allowedRecordNodeIds = [cloned.nodeId]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,4 +279,6 @@ export default {
|
||||||
fieldReversesReferenceToNode,
|
fieldReversesReferenceToNode,
|
||||||
fieldReversesReferenceToIndex,
|
fieldReversesReferenceToIndex,
|
||||||
getFlattenedHierarchy,
|
getFlattenedHierarchy,
|
||||||
|
isTopLevelIndex,
|
||||||
|
isTopLevelRecord,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue