better naming of default child view
This commit is contained in:
parent
87e33c8b99
commit
acb49a305b
|
@ -198,7 +198,10 @@ export const saveCurrentNode = store => () => {
|
|||
const defaultIndex = templateApi(state.hierarchy).getNewIndexTemplate(
|
||||
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]
|
||||
}
|
||||
|
||||
|
|
|
@ -279,4 +279,6 @@ export default {
|
|||
fieldReversesReferenceToNode,
|
||||
fieldReversesReferenceToIndex,
|
||||
getFlattenedHierarchy,
|
||||
isTopLevelIndex,
|
||||
isTopLevelRecord,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue