Merge pull request #6558 from Budibase/feature/component-condition-count
Feature/component condition count
This commit is contained in:
commit
b52fb1c42c
|
@ -28,12 +28,15 @@
|
||||||
}
|
}
|
||||||
drawer.hide()
|
drawer.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$: conditionCount = componentInstance?._conditions?.length
|
||||||
|
$: conditionText = `${conditionCount || "No"} condition${
|
||||||
|
conditionCount !== 1 ? "s" : ""
|
||||||
|
} set`
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<DetailSummary
|
<DetailSummary name={"Conditions"} collapsible={false}>
|
||||||
name={`Conditions${componentInstance?._conditions ? " *" : ""}`}
|
<div class="conditionCount">{conditionText}</div>
|
||||||
collapsible={false}
|
|
||||||
>
|
|
||||||
<div>
|
<div>
|
||||||
<ActionButton on:click={openDrawer}>Configure conditions</ActionButton>
|
<ActionButton on:click={openDrawer}>Configure conditions</ActionButton>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,3 +48,10 @@
|
||||||
<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>
|
||||||
|
|
Loading…
Reference in New Issue