From 231eec81abe85f1a55ebc78e423a9b7e7a4505bb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 3 Feb 2021 10:05:49 +0000 Subject: [PATCH] Add confirmation dialog before resetting form fields manually --- .../design/PropertiesPanel/SettingsView.svelte | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte b/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte index 948412b004..fb8ebbf8e4 100644 --- a/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte @@ -2,6 +2,7 @@ import { get } from "lodash" import { isEmpty } from "lodash/fp" import { Button } from "@budibase/bbui" + import ConfirmDialog from "components/common/ConfirmDialog.svelte" import { currentAsset } from "builderStore" import { findClosestMatchingComponent } from "builderStore/storeUtils" import { makeSchemaFormComponents } from "builderStore/store/screenTemplates/utils/commonComponents" @@ -50,6 +51,7 @@ "layoutId", "routing.roleId", ] + let confirmResetFieldsDialog $: settings = componentDefinition?.settings ?? [] $: isLayout = assetInstance && assetInstance.favicon @@ -154,9 +156,17 @@ {/if} {#if componentDefinition?.component?.endsWith('/fieldgroup')} - + {/if} +