From b89573e1f2aeb806c7016275edf0577136a8847e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Fri, 19 Feb 2021 13:56:24 +0100 Subject: [PATCH] lint fix --- packages/builder/src/builderStore/store/backend.js | 12 +++++++++--- .../store/screenTemplates/utils/commonComponents.js | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js index cae1e9f2b4..951eaba683 100644 --- a/packages/builder/src/builderStore/store/backend.js +++ b/packages/builder/src/builderStore/store/backend.js @@ -234,7 +234,13 @@ export const getBackendUiStore = () => { return state }) }, - saveField: ({ originalName, field, primaryDisplay = false, indexes, relationshipType }) => { + saveField: ({ + originalName, + field, + primaryDisplay = false, + indexes, + relationshipType, + }) => { store.update(state => { // delete the original if renaming // need to handle if the column had no name, empty string @@ -250,9 +256,9 @@ export const getBackendUiStore = () => { if (primaryDisplay) { state.draftTable.primaryDisplay = field.name } - + // Set relationship type - if (field.type === 'link') { + if (field.type === "link") { state.draftTable.relationshipType = relationshipType } diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js index ca7dd68e40..1634556c8d 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js +++ b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js @@ -199,7 +199,10 @@ export function makeDatasourceFormComponents(datasource) { component.customProps({ placeholder: "Choose an option " }) } if (fieldType === "link") { - let placeholder = fieldSchema.relationshipType === 'one-to-many' ? 'Choose an option' : 'Choose some options' + let placeholder = + fieldSchema.relationshipType === "one-to-many" + ? "Choose an option" + : "Choose some options" component.customProps({ placeholder }) } if (fieldType === "boolean") {