Rename usages of primary display column to just display column

This commit is contained in:
Andrew Kingston 2020-10-14 20:38:32 +01:00
parent db8e0b03c4
commit d5630760cc
5 changed files with 6 additions and 6 deletions

View File

@ -103,7 +103,7 @@ export const getBackendUiStore = () => {
} }
} }
// Optionally set primary display // Optionally set display column
if (primaryDisplay) { if (primaryDisplay) {
state.draftTable.primaryDisplay = field.name state.draftTable.primaryDisplay = field.name
} }

View File

@ -33,7 +33,7 @@
function deleteColumn() { function deleteColumn() {
if (field.name === $backendUiStore.selectedTable.primaryDisplay) { if (field.name === $backendUiStore.selectedTable.primaryDisplay) {
notifier.danger("You cannot delete the primary display column") notifier.danger("You cannot delete the display column")
} else { } else {
backendUiStore.actions.tables.deleteField(field) backendUiStore.actions.tables.deleteField(field)
notifier.success("Column deleted") notifier.success("Column deleted")
@ -44,7 +44,7 @@
function sort(direction, column) { function sort(direction, column) {
backendUiStore.update(state => { backendUiStore.update(state => {
if (direction !== "none") { if (direction !== "none") {
state.sort = {direction, column} state.sort = { direction, column }
} else { } else {
state.sort = undefined state.sort = undefined
} }

View File

@ -36,7 +36,7 @@
{#if linkedTable.primaryDisplay == null} {#if linkedTable.primaryDisplay == null}
<Label extraSmall grey>{label}</Label> <Label extraSmall grey>{label}</Label>
<Label small black> <Label small black>
Please choose a primary display column for the Please choose a display column for the
<b>{linkedTable.name}</b> <b>{linkedTable.name}</b>
table. table.
</Label> </Label>

View File

@ -52,7 +52,7 @@ exports.save = async function(ctx) {
if (_rename && tableToSave.schema[_rename.updated].type === "link") { if (_rename && tableToSave.schema[_rename.updated].type === "link") {
throw "Cannot rename a linked field." throw "Cannot rename a linked field."
} else if (_rename && tableToSave.primaryDisplay === _rename.old) { } else if (_rename && tableToSave.primaryDisplay === _rename.old) {
throw "Cannot rename the primary display field." throw "Cannot rename the display column."
} else if (_rename) { } else if (_rename) {
const rows = await db.allDocs( const rows = await db.allDocs(
getRowParams(tableToSave._id, null, { getRowParams(tableToSave._id, null, {

View File

@ -45,7 +45,7 @@
<Label extraSmall grey>{label}</Label> <Label extraSmall grey>{label}</Label>
{/if} {/if}
<Label small black> <Label small black>
Please choose a primary display column for the Please choose a display column for the
<b>{linkedTable.name}</b> <b>{linkedTable.name}</b>
table. table.
</Label> </Label>