From b65e9cfc80c08deea471b3cad8e33a1d8508f9d6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 12:20:19 +0200 Subject: [PATCH] Lint --- .../components/grid/controls/ColumnsSettingButton.svelte | 6 ++++-- packages/server/src/api/routes/utils/validators.ts | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte b/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte index 7f54dbf582..9f7ced013d 100644 --- a/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte +++ b/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte @@ -71,9 +71,11 @@ options.push({ icon: "VisibilityOff", value: PERMISSION_OPTIONS.HIDDEN, - tooltip: requiredTooltip || "Hidden", disabled: isDisplayColumn || isRequired, - tooltip: isDisplayColumn && "Display column cannot be hidden", + tooltip: + (isDisplayColumn && "Display column cannot be hidden") || + requiredTooltip || + "Hidden", }) return { ...c, options } diff --git a/packages/server/src/api/routes/utils/validators.ts b/packages/server/src/api/routes/utils/validators.ts index e2cc463f38..a63b29fe5a 100644 --- a/packages/server/src/api/routes/utils/validators.ts +++ b/packages/server/src/api/routes/utils/validators.ts @@ -2,10 +2,11 @@ import { auth, permissions } from "@budibase/backend-core" import { DataSourceOperation } from "../../../constants" import { Table, WebhookActionType } from "@budibase/types" import Joi, { CustomValidator } from "joi" -import { ValidSnippetNameRegex } from "@budibase/shared-core" -import { isRequired } from "../../../utilities/schema" +import { ValidSnippetNameRegex, helpers } from "@budibase/shared-core" import sdk from "../../../sdk" +const { isRequired } = helpers.schema + const OPTIONAL_STRING = Joi.string().optional().allow(null).allow("") const OPTIONAL_NUMBER = Joi.number().optional().allow(null) const OPTIONAL_BOOLEAN = Joi.boolean().optional().allow(null)