1
0
Fork 0
mirror of synced 2024-09-06 12:41:24 +12:00

Merge pull request #11851 from Budibase/remove-default-value-conditions

Remove form field default value settings from being updated by conditions
This commit is contained in:
Andrew Kingston 2023-09-22 16:10:06 +01:00 committed by GitHub
commit 9dbaedc465
3 changed files with 31 additions and 27 deletions

View file

@ -61,10 +61,12 @@
key: "_css", key: "_css",
type: "text", type: "text",
}) })
$: settingOptions = settings.map(setting => ({ $: settingOptions = settings
label: makeLabel(setting), .filter(setting => setting.supportsConditions !== false)
value: setting.key, .map(setting => ({
})) label: makeLabel(setting),
value: setting.key,
}))
$: conditions.forEach(link => { $: conditions.forEach(link => {
if (!link.id) { if (!link.id) {
link.id = generate() link.id = generate()

View file

@ -36,10 +36,7 @@
</script> </script>
<DetailSummary name={"Conditions"} collapsible={false}> <DetailSummary name={"Conditions"} collapsible={false}>
<div class="conditionCount">{conditionText}</div> <ActionButton on:click={openDrawer}>{conditionText}</ActionButton>
<div>
<ActionButton on:click={openDrawer}>Configure conditions</ActionButton>
</div>
</DetailSummary> </DetailSummary>
<Drawer bind:this={drawer} title="Conditions"> <Drawer bind:this={drawer} title="Conditions">
<svelte:fragment slot="description"> <svelte:fragment slot="description">
@ -48,10 +45,3 @@
<Button cta slot="buttons" on:click={() => save()}>Save</Button> <Button cta slot="buttons" on:click={() => save()}>Save</Button>
<ConditionalUIDrawer slot="body" bind:conditions={tempValue} {bindings} /> <ConditionalUIDrawer slot="body" bind:conditions={tempValue} {bindings} />
</Drawer> </Drawer>
<style>
.conditionCount {
font-weight: 600;
margin-top: -5px;
}
</style>

View file

@ -2539,7 +2539,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -2629,7 +2630,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -2685,7 +2687,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -2736,7 +2739,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -2841,7 +2845,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "boolean", "type": "boolean",
@ -2960,7 +2965,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -3143,7 +3149,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -3200,7 +3207,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -3301,7 +3309,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -3355,7 +3364,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "boolean", "type": "boolean",
@ -3622,7 +3632,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",
@ -3689,7 +3700,8 @@
{ {
"type": "text", "type": "text",
"label": "Default value", "label": "Default value",
"key": "defaultValue" "key": "defaultValue",
"supportsConditions": false
}, },
{ {
"type": "event", "type": "event",