builder: create record: set collection name automatically
This commit is contained in:
parent
1503eaf159
commit
d5fb7e50c8
|
@ -79,6 +79,12 @@ let getTypeOptions = typeOptions =>
|
|||
join("<br>")
|
||||
]);
|
||||
|
||||
const nameChanged = ev => {
|
||||
const pluralName = n => `${n}s`;
|
||||
if(record.collectionName === "") {
|
||||
record.collectionName = pluralName(ev.target.value);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -89,7 +95,7 @@ let getTypeOptions = typeOptions =>
|
|||
Settings
|
||||
</h3>
|
||||
|
||||
<Textbox label="Name:" bind:text={record.name} />
|
||||
<Textbox label="Name:" bind:text={record.name} on:change={nameChanged}/>
|
||||
{#if !record.isSingle}
|
||||
<Textbox label="Collection Name:" bind:text={record.collectionName} />
|
||||
<Textbox label="Shard Factor:" bind:text={record.allidsShardFactor} />
|
||||
|
|
Loading…
Reference in New Issue