collection name uses nodeId by default, and field is removed
This commit is contained in:
parent
e20bb608dd
commit
bcd8b602b3
|
@ -101,12 +101,8 @@
|
|||
<h4 class="budibase__label--big">Settings</h4>
|
||||
<form class="uk-form-stacked">
|
||||
|
||||
<Textbox label="Name" bind:text={record.name} on:change={nameChanged} />
|
||||
|
||||
<div class="horizontal-stack">
|
||||
{#if !record.isSingle}
|
||||
<Textbox label="Collection Name" bind:text={record.collectionName} />
|
||||
{/if}
|
||||
<Textbox label="Name" bind:text={record.name} on:change={nameChanged} />
|
||||
<div>
|
||||
<label class="uk-form-label">Parent</label>
|
||||
<div class="uk-form-controls">
|
||||
|
|
|
@ -160,16 +160,17 @@ export const getNewRootLevel = () =>
|
|||
})
|
||||
|
||||
const _getNewRecordTemplate = (parent, name, createDefaultIndex, isSingle) => {
|
||||
const nodeId = getNodeId(parent)
|
||||
const node = constructNode(parent, {
|
||||
name,
|
||||
type: "record",
|
||||
fields: [],
|
||||
children: [],
|
||||
validationRules: [],
|
||||
nodeId: getNodeId(parent),
|
||||
nodeId: nodeId,
|
||||
indexes: [],
|
||||
estimatedRecordCount: isRecord(parent) ? 500 : 1000000,
|
||||
collectionName: "",
|
||||
collectionName: (nodeId || "").toString(),
|
||||
isSingle,
|
||||
})
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("hierarchy node creation", () => {
|
|||
expect(record.validationRules).toEqual([])
|
||||
expect(record.indexes).toEqual([])
|
||||
expect(record.parent()).toBe(root)
|
||||
expect(record.collectionName).toBe("")
|
||||
expect(record.collectionName).toBe(record.nodeId.toString())
|
||||
expect(record.estimatedRecordCount).toBe(1000000)
|
||||
expect(record.isSingle).toBe(false)
|
||||
|
||||
|
|
Loading…
Reference in New Issue