This commit is contained in:
Adria Navarro 2024-12-24 13:03:39 +01:00
parent fc51b4e132
commit 69312c31af
1 changed files with 2 additions and 6 deletions

View File

@ -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) {