Refresh data when adding columns

This commit is contained in:
Andrew Kingston 2024-10-01 16:25:48 +01:00
parent 198aa6a980
commit 1dea53f597
No known key found for this signature in database
1 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,12 @@
import { getContext } from "svelte"
import CreateEditColumn from "components/backend/DataTable/modals/CreateEditColumn.svelte"
const { datasource } = getContext("grid")
const { datasource, rows } = getContext("grid")
const onUpdate = async () => {
await datasource.actions.refreshDefinition()
await rows.actions.refreshData()
}
</script>
<CreateEditColumn on:updatecolumns={datasource.actions.refreshDefinition} />
<CreateEditColumn on:updatecolumns={onUpdate} />