Type UIRow
This commit is contained in:
parent
51688543b1
commit
8958b8d14c
|
@ -3,12 +3,12 @@ import { getDatasourceDefinition, getDatasourceSchema } from "../../../fetch"
|
||||||
import { enrichSchemaWithRelColumns, memo } from "../../../utils"
|
import { enrichSchemaWithRelColumns, memo } from "../../../utils"
|
||||||
import { cloneDeep } from "lodash"
|
import { cloneDeep } from "lodash"
|
||||||
import {
|
import {
|
||||||
Row,
|
|
||||||
SaveRowRequest,
|
SaveRowRequest,
|
||||||
SaveTableRequest,
|
SaveTableRequest,
|
||||||
UIDatasource,
|
UIDatasource,
|
||||||
UIFieldMutation,
|
UIFieldMutation,
|
||||||
UIFieldSchema,
|
UIFieldSchema,
|
||||||
|
UIRow,
|
||||||
UpdateViewRequest,
|
UpdateViewRequest,
|
||||||
ViewV2Type,
|
ViewV2Type,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
@ -331,7 +331,7 @@ export const createActions = (context: StoreContext): ActionDatasourceStore => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deletes rows from the datasource
|
// Deletes rows from the datasource
|
||||||
const deleteRows = async (rows: Row[]) => {
|
const deleteRows = async (rows: UIRow[]) => {
|
||||||
return await getAPI()?.actions.deleteRows(rows)
|
return await getAPI()?.actions.deleteRows(rows)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import {
|
import {
|
||||||
Row,
|
|
||||||
SaveRowRequest,
|
SaveRowRequest,
|
||||||
SaveTableRequest,
|
SaveTableRequest,
|
||||||
UIDatasource,
|
UIDatasource,
|
||||||
|
UIRow,
|
||||||
UpdateViewRequest,
|
UpdateViewRequest,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@ interface DatasourceBaseActions<
|
||||||
TSaveDefinitionRequest = UpdateViewRequest | SaveTableRequest
|
TSaveDefinitionRequest = UpdateViewRequest | SaveTableRequest
|
||||||
> {
|
> {
|
||||||
saveDefinition: (newDefinition: TSaveDefinitionRequest) => Promise<void>
|
saveDefinition: (newDefinition: TSaveDefinitionRequest) => Promise<void>
|
||||||
addRow: (row: SaveRowRequest) => Promise<Row | void>
|
addRow: (row: SaveRowRequest) => Promise<UIRow | void>
|
||||||
updateRow: (row: SaveRowRequest) => Promise<Row | void>
|
updateRow: (row: SaveRowRequest) => Promise<UIRow | void>
|
||||||
deleteRows: (rows: Row[]) => Promise<void>
|
deleteRows: (rows: UIRow[]) => Promise<void>
|
||||||
getRow: (id: string) => Promise<Row | void>
|
getRow: (id: string) => Promise<UIRow | void>
|
||||||
isDatasourceValid: (datasource: UIDatasource) => boolean | void
|
isDatasourceValid: (datasource: UIDatasource) => boolean | void
|
||||||
canUseColumn: (name: string) => boolean | void
|
canUseColumn: (name: string) => boolean | void
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,3 +4,4 @@ export * from "./table"
|
||||||
export * from "./view"
|
export * from "./view"
|
||||||
export * from "./user"
|
export * from "./user"
|
||||||
export * from "./filters"
|
export * from "./filters"
|
||||||
|
export * from "./rows"
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { Row } from "@budibase/types"
|
||||||
|
|
||||||
|
export type UIRow = Row & { _id: string }
|
Loading…
Reference in New Issue