Skip to content

Commit

Permalink
Fix filtering on booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
stnguyen90 committed Nov 1, 2023
1 parent 496dd4f commit e76b9ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib/components/filters/content.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@
<div class="u-margin-block-start-8">
{#if column.type === 'integer' || column.type === 'double'}
<InputNumber id="value" bind:value placeholder="Enter value" />
{:else if column.type === 'boolean'}
<InputSelect
id="value"
placeholder="Select a value"
required={true}
options={[
{ label: 'True', value: true },
{ label: 'False', value: false }
].filter(Boolean)}
bind:value />
{:else}
<InputText id="value" bind:value placeholder="Enter value" />
{/if}
Expand Down

0 comments on commit e76b9ae

Please sign in to comment.