Add feature flag for datasource setting checks
This commit is contained in:
parent
012bb4e1cc
commit
388a94aee1
|
@ -9,3 +9,4 @@ export {
|
|||
lowercase,
|
||||
isBuilderInputFocused,
|
||||
} from "./helpers"
|
||||
export * as featureFlag from "./featureFlags"
|
||||
|
|
|
@ -5,9 +5,15 @@ import { viewsV2 } from "./viewsV2"
|
|||
import { findComponentsBySettingsType } from "@/helpers/screen"
|
||||
import { Screen, Table, ViewV2 } from "@budibase/types"
|
||||
|
||||
import { featureFlag } from "@/helpers"
|
||||
|
||||
export const screenComponentErrors = derived(
|
||||
[selectedScreen, tables, viewsV2],
|
||||
([$selectedScreen, $tables, $viewsV2]): Record<string, string[]> => {
|
||||
if (!featureFlag.isEnabled("CHECK_SCREEN_COMPONENT_SETTINGS_ERRORS")) {
|
||||
return {}
|
||||
}
|
||||
|
||||
function flattenTablesAndViews(tables: Table[], views: ViewV2[]) {
|
||||
return {
|
||||
...tables.reduce(
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
export enum FeatureFlag {
|
||||
USE_ZOD_VALIDATOR = "USE_ZOD_VALIDATOR",
|
||||
CHECK_SCREEN_COMPONENT_SETTINGS_ERRORS = "CHECK_SCREEN_COMPONENT_SETTINGS_ERRORS",
|
||||
|
||||
// Account-portal
|
||||
DIRECT_LOGIN_TO_ACCOUNT_PORTAL = "DIRECT_LOGIN_TO_ACCOUNT_PORTAL",
|
||||
|
@ -7,6 +8,7 @@ export enum FeatureFlag {
|
|||
|
||||
export const FeatureFlagDefaults = {
|
||||
[FeatureFlag.USE_ZOD_VALIDATOR]: false,
|
||||
[FeatureFlag.CHECK_SCREEN_COMPONENT_SETTINGS_ERRORS]: false,
|
||||
|
||||
// Account-portal
|
||||
[FeatureFlag.DIRECT_LOGIN_TO_ACCOUNT_PORTAL]: false,
|
||||
|
|
Loading…
Reference in New Issue