Fix placement of 'reset fields' button for field groups

This commit is contained in:
Andrew Kingston 2021-06-28 10:09:31 +01:00
parent d65d4975c9
commit be37720dc5
3 changed files with 6 additions and 5 deletions

View File

@ -30,6 +30,7 @@
import DateTimeFieldSelect from "./PropertyControls/DateTimeFieldSelect.svelte"
import AttachmentFieldSelect from "./PropertyControls/AttachmentFieldSelect.svelte"
import RelationshipFieldSelect from "./PropertyControls/RelationshipFieldSelect.svelte"
import ResetFieldsButton from "./PropertyControls/ResetFieldsButton.svelte"
export let componentDefinition
export let componentInstance
@ -122,6 +123,9 @@
{/if}
{/each}
{/if}
{#if componentDefinition?.component?.endsWith("/fieldgroup")}
<ResetFieldsButton {componentInstance} />
{/if}
{#if componentDefinition?.info}
<div class="text">
{@html componentDefinition?.info}

View File

@ -5,7 +5,6 @@
import ComponentSettingsSection from "./ComponentSettingsSection.svelte"
import DesignSection from "./DesignSection.svelte"
import CustomStylesSection from "./CustomStylesSection.svelte"
import ActionsSection from "./ActionsSection.svelte"
$: componentInstance = $selectedComponent
$: componentDefinition = store.actions.components.getDefinition(
@ -20,7 +19,6 @@
<ComponentSettingsSection {componentInstance} {componentDefinition} />
<DesignSection {componentInstance} {componentDefinition} />
<CustomStylesSection {componentInstance} {componentDefinition} />
<ActionsSection {componentInstance} {componentDefinition} />
</div>
</Tab>
</Tabs>

View File

@ -5,7 +5,6 @@
import { makeDatasourceFormComponents } from "builderStore/store/screenTemplates/utils/commonComponents"
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
export let componentDefinition
export let componentInstance
let confirmResetFieldsDialog
@ -25,7 +24,7 @@
}
</script>
{#if componentDefinition?.component?.endsWith("/fieldgroup")}
<div>
<ActionButton
secondary
wide
@ -33,7 +32,7 @@
>
Update form fields
</ActionButton>
{/if}
</div>
<ConfirmDialog
bind:this={confirmResetFieldsDialog}