Refresh data when adding columns
This commit is contained in:
parent
198aa6a980
commit
1dea53f597
|
@ -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} />
|
||||
|
|
Loading…
Reference in New Issue