Browse Source
Merge pull request #6558 from Budibase/feature/component-condition-count
Feature/component condition count
master
deanhannigan
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
14 additions and
4 deletions
-
packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUISection.svelte
|
|
|
@ -28,12 +28,15 @@ |
|
|
|
} |
|
|
|
drawer.hide() |
|
|
|
} |
|
|
|
|
|
|
|
$: conditionCount = componentInstance?._conditions?.length |
|
|
|
$: conditionText = `${conditionCount || "No"} condition${ |
|
|
|
conditionCount !== 1 ? "s" : "" |
|
|
|
} set` |
|
|
|
</script> |
|
|
|
|
|
|
|
<DetailSummary |
|
|
|
name={`Conditions${componentInstance?._conditions ? " *" : ""}`} |
|
|
|
collapsible={false} |
|
|
|
> |
|
|
|
<DetailSummary name={"Conditions"} collapsible={false}> |
|
|
|
<div class="conditionCount">{conditionText}</div> |
|
|
|
<div> |
|
|
|
<ActionButton on:click={openDrawer}>Configure conditions</ActionButton> |
|
|
|
</div> |
|
|
|
@ -45,3 +48,10 @@ |
|
|
|
<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> |
|
|
|
|