Fix filters not working
This commit is contained in:
parent
727d3d5b6d
commit
38f326dce4
|
@ -2,7 +2,7 @@
|
||||||
import TableFilterButton from "../TableFilterButton.svelte"
|
import TableFilterButton from "../TableFilterButton.svelte"
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
|
|
||||||
const { columns, config, filter, schema } = getContext("sheet")
|
const { columns, config, filter, table } = getContext("sheet")
|
||||||
|
|
||||||
const onFilter = e => {
|
const onFilter = e => {
|
||||||
filter.set(e.detail || [])
|
filter.set(e.detail || [])
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
{#key $config.tableId}
|
{#key $config.tableId}
|
||||||
<TableFilterButton
|
<TableFilterButton
|
||||||
schema={$schema}
|
schema={$table?.schema}
|
||||||
filters={$filter}
|
filters={$filter}
|
||||||
on:change={onFilter}
|
on:change={onFilter}
|
||||||
disabled={!$columns.length}
|
disabled={!$columns.length}
|
||||||
|
|
Loading…
Reference in New Issue