diff --git a/packages/frontend-core/src/components/grid/stores/rows.ts b/packages/frontend-core/src/components/grid/stores/rows.ts index 4b5b4121f5..b8bb1142aa 100644 --- a/packages/frontend-core/src/components/grid/stores/rows.ts +++ b/packages/frontend-core/src/components/grid/stores/rows.ts @@ -55,14 +55,22 @@ interface RowActionStore { value: any apply: boolean }) => Promise - applyRowChanges: any - deleteRows: any - loadNextPage: any - refreshRow: any - replaceRow: any - refreshData: any - cleanRow: any - bulkUpdate: any + applyRowChanges: (params: { + rowId: string + changes?: any + updateState?: boolean + handleErrors?: boolean + }) => Promise + deleteRows: (rowsToDelete: UIRow[]) => Promise + loadNextPage: () => void + refreshRow: (id: string) => Promise + replaceRow: (id: string, row: UIRow | undefined) => void + refreshData: () => void + cleanRow: (row: UIRow) => Row + bulkUpdate: ( + changeMap: Record, + progressCallback: (any: number) => void + ) => Promise } } } @@ -763,8 +771,8 @@ export const createActions = (context: StoreContext): RowActionStore => { // Cleans a row by removing any internal grid metadata from it. // Call this before passing a row to any sort of external flow. - const cleanRow = (row: Row) => { - let clone = { ...row } + const cleanRow = (row: UIRow) => { + let clone: Row = { ...row } delete clone.__idx delete clone.__metadata if (!get(hasBudibaseIdentifiers) && isGeneratedRowID(clone._id!)) {