Fix importing and exporting with sheets
This commit is contained in:
parent
7fa976ba5e
commit
7bbb8e5648
|
@ -2,7 +2,7 @@
|
|||
import ExportButton from "../ExportButton.svelte"
|
||||
import { getContext } from "svelte"
|
||||
|
||||
const { rows, columns, config, sort, selectedRows, filter } =
|
||||
const { rows, columns, tableId, sort, selectedRows, filter } =
|
||||
getContext("sheet")
|
||||
|
||||
$: disabled = !$rows.length || !$columns.length
|
||||
|
@ -11,7 +11,7 @@
|
|||
|
||||
<ExportButton
|
||||
{disabled}
|
||||
view={$config.tableId}
|
||||
view={$tableId}
|
||||
filters={$filter}
|
||||
sorting={{
|
||||
sortColumn: $sort.column,
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
import ImportButton from "../ImportButton.svelte"
|
||||
import { getContext } from "svelte"
|
||||
|
||||
const { rows, config } = getContext("sheet")
|
||||
|
||||
const refresh = () => {
|
||||
rows.actions.refreshData()
|
||||
}
|
||||
const { rows, tableId } = getContext("sheet")
|
||||
</script>
|
||||
|
||||
<ImportButton tableId={$config.tableId} on:importrows={refresh} />
|
||||
<ImportButton tableId={$tableId} on:importrows={rows.actions.refreshData} />
|
||||
|
|
Loading…
Reference in New Issue