Updates
This commit is contained in:
parent
fc51b4e132
commit
69312c31af
|
@ -5,11 +5,9 @@ import { cloneDeep } from "lodash"
|
||||||
import {
|
import {
|
||||||
Row,
|
Row,
|
||||||
SaveRowRequest,
|
SaveRowRequest,
|
||||||
SaveTableRequest,
|
|
||||||
UIDatasource,
|
UIDatasource,
|
||||||
UIFieldMutation,
|
UIFieldMutation,
|
||||||
UIFieldSchema,
|
UIFieldSchema,
|
||||||
UpdateViewRequest,
|
|
||||||
ViewV2Type,
|
ViewV2Type,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { Store as StoreContext } from "."
|
import { Store as StoreContext } from "."
|
||||||
|
@ -195,12 +193,10 @@ export const createActions = (context: StoreContext): ActionDatasourceStore => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Saves the datasource definition
|
// Saves the datasource definition
|
||||||
const saveDefinition = async (
|
const saveDefinition = async (newDefinition: UIDatasource) => {
|
||||||
newDefinition: UpdateViewRequest | SaveTableRequest
|
|
||||||
) => {
|
|
||||||
// Update local state
|
// Update local state
|
||||||
const originalDefinition = get(definition)
|
const originalDefinition = get(definition)
|
||||||
definition.set(newDefinition as any)
|
definition.set(newDefinition)
|
||||||
|
|
||||||
// Update server
|
// Update server
|
||||||
if (get(config).canSaveSchema) {
|
if (get(config).canSaveSchema) {
|
||||||
|
|
Loading…
Reference in New Issue