Fix grid import and export for tables

This commit is contained in:
Andrew Kingston 2023-07-28 16:02:31 +01:00
parent c7c9bd6563
commit 1aea6fce09
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
import ExportButton from "../ExportButton.svelte"
import { getContext } from "svelte"
const { rows, columns, tableId, sort, selectedRows, filter } =
const { rows, columns, datasource, sort, selectedRows, filter } =
getContext("grid")
$: disabled = !$rows.length || !$columns.length
@ -12,7 +12,7 @@
<span data-ignore-click-outside="true">
<ExportButton
{disabled}
view={$tableId}
view={$datasource.tableId}
filters={$filter}
sorting={{
sortColumn: $sort.column,

View File

@ -4,12 +4,12 @@
export let disabled = false
const { rows, tableId, table } = getContext("grid")
const { rows, datasource, table } = getContext("grid")
</script>
<ImportButton
{disabled}
tableId={$tableId}
tableId={$datasource.tableId}
tableType={$table?.type}
on:importrows={rows.actions.refreshData}
/>