Merge pull request #14680 from Budibase/refresh-data-when-adding-formulae

Refresh data when adding columns
This commit is contained in:
Andrew Kingston 2024-10-01 16:32:19 +01:00 committed by GitHub
commit 46ace1aa16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,12 @@
import { getContext } from "svelte" import { getContext } from "svelte"
import CreateEditColumn from "components/backend/DataTable/modals/CreateEditColumn.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> </script>
<CreateEditColumn on:updatecolumns={datasource.actions.refreshDefinition} /> <CreateEditColumn on:updatecolumns={onUpdate} />