Type action store
This commit is contained in:
parent
0684b431e4
commit
d48b6c20a3
|
@ -55,14 +55,22 @@ interface RowActionStore {
|
||||||
value: any
|
value: any
|
||||||
apply: boolean
|
apply: boolean
|
||||||
}) => Promise<void>
|
}) => Promise<void>
|
||||||
applyRowChanges: any
|
applyRowChanges: (params: {
|
||||||
deleteRows: any
|
rowId: string
|
||||||
loadNextPage: any
|
changes?: any
|
||||||
refreshRow: any
|
updateState?: boolean
|
||||||
replaceRow: any
|
handleErrors?: boolean
|
||||||
refreshData: any
|
}) => Promise<UIRow | undefined>
|
||||||
cleanRow: any
|
deleteRows: (rowsToDelete: UIRow[]) => Promise<void>
|
||||||
bulkUpdate: any
|
loadNextPage: () => void
|
||||||
|
refreshRow: (id: string) => Promise<void>
|
||||||
|
replaceRow: (id: string, row: UIRow | undefined) => void
|
||||||
|
refreshData: () => void
|
||||||
|
cleanRow: (row: UIRow) => Row
|
||||||
|
bulkUpdate: (
|
||||||
|
changeMap: Record<string, any>,
|
||||||
|
progressCallback: (any: number) => void
|
||||||
|
) => Promise<void>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -763,8 +771,8 @@ export const createActions = (context: StoreContext): RowActionStore => {
|
||||||
|
|
||||||
// Cleans a row by removing any internal grid metadata from it.
|
// Cleans a row by removing any internal grid metadata from it.
|
||||||
// Call this before passing a row to any sort of external flow.
|
// Call this before passing a row to any sort of external flow.
|
||||||
const cleanRow = (row: Row) => {
|
const cleanRow = (row: UIRow) => {
|
||||||
let clone = { ...row }
|
let clone: Row = { ...row }
|
||||||
delete clone.__idx
|
delete clone.__idx
|
||||||
delete clone.__metadata
|
delete clone.__metadata
|
||||||
if (!get(hasBudibaseIdentifiers) && isGeneratedRowID(clone._id!)) {
|
if (!get(hasBudibaseIdentifiers) && isGeneratedRowID(clone._id!)) {
|
||||||
|
|
Loading…
Reference in New Issue