Fix "type" conflicts
This commit is contained in:
parent
06feba95ad
commit
68eb809d28
|
@ -5,9 +5,11 @@ 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 "."
|
||||||
|
@ -192,10 +194,12 @@ export const createActions = (context: StoreContext): ActionDatasourceStore => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Saves the datasource definition
|
// Saves the datasource definition
|
||||||
const saveDefinition = async (newDefinition: UIDatasource) => {
|
const saveDefinition = async (
|
||||||
|
newDefinition: SaveTableRequest | UpdateViewRequest
|
||||||
|
) => {
|
||||||
// Update local state
|
// Update local state
|
||||||
const originalDefinition = get(definition)
|
const originalDefinition = get(definition)
|
||||||
definition.set(newDefinition)
|
definition.set(newDefinition as UIDatasource)
|
||||||
|
|
||||||
// Update server
|
// Update server
|
||||||
if (get(config).canSaveSchema) {
|
if (get(config).canSaveSchema) {
|
||||||
|
|
|
@ -4,12 +4,14 @@ import {
|
||||||
FieldType,
|
FieldType,
|
||||||
RelationSchemaField,
|
RelationSchemaField,
|
||||||
SortOrder,
|
SortOrder,
|
||||||
|
Table,
|
||||||
UISearchFilter,
|
UISearchFilter,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export interface UITable {
|
export interface UITable extends Omit<Table, "type"> {
|
||||||
name: string
|
name: string
|
||||||
id: string
|
id: string
|
||||||
|
type: string
|
||||||
tableId: string
|
tableId: string
|
||||||
primaryDisplay?: string
|
primaryDisplay?: string
|
||||||
sort?: {
|
sort?: {
|
||||||
|
|
Loading…
Reference in New Issue