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",
type: "text",
})
$: settingOptions = settings.map(setting => ({
label: makeLabel(setting),
value: setting.key,
}))
$: settingOptions = settings
.filter(setting => setting.supportsConditions !== false)
.map(setting => ({
label: makeLabel(setting),
value: setting.key,
}))
$: conditions.forEach(link => {
if (!link.id) {
link.id = generate()

View File

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

View File

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