1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

Add proper components for dates and boolean types in grid condition editor and fix highlight showing in sticky column gutter cell

This commit is contained in:
Andrew Kingston 2024-06-27 16:06:47 +01:00
parent c62e6d776c
commit c41232bc12
No known key found for this signature in database
2 changed files with 26 additions and 7 deletions

View file

@ -7,6 +7,7 @@
Layout, Layout,
Select, Select,
Icon, Icon,
DatePicker,
} from "@budibase/bbui" } from "@budibase/bbui"
import { createEventDispatcher } from "svelte" import { createEventDispatcher } from "svelte"
import { cloneDeep } from "lodash" import { cloneDeep } from "lodash"
@ -167,13 +168,28 @@
placeholder={null} placeholder={null}
on:change={() => onValueTypeChange(condition)} on:change={() => onValueTypeChange(condition)}
/> />
{#if type === FieldType.DATETIME && condition.valueType === type}
<DatePicker
placeholder="Value"
disabled={condition.noValue}
bind:value={condition.referenceValue}
/>
{:else if type === FieldType.BOOLEAN && condition.valueType === type}
<Select
placeholder="Value"
disabled={condition.noValue}
options={["True", "False"]}
bind:value={condition.referenceValue}
/>
{:else}
<DrawerBindableInput <DrawerBindableInput
{bindings} {bindings}
disabled={condition.noValue}
placeholder="Value" placeholder="Value"
disabled={condition.noValue}
value={condition.referenceValue} value={condition.referenceValue}
on:change={e => (condition.referenceValue = e.detail)} on:change={e => (condition.referenceValue = e.detail)}
/> />
{/if}
<Icon <Icon
name="Duplicate" name="Duplicate"
hoverable hoverable

View file

@ -175,6 +175,9 @@
.header :global(.cell) { .header :global(.cell) {
background: var(--grid-background-alt); background: var(--grid-background-alt);
} }
.header :global(.cell::before) {
display: none;
}
.row { .row {
display: flex; display: flex;
flex-direction: row; flex-direction: row;