diff --git a/packages/frontend-core/src/fetch/DataFetch.ts b/packages/frontend-core/src/fetch/DataFetch.ts index d8a8e15245..67ed07a835 100644 --- a/packages/frontend-core/src/fetch/DataFetch.ts +++ b/packages/frontend-core/src/fetch/DataFetch.ts @@ -322,10 +322,10 @@ export default abstract class DataFetch { abstract getData(): Promise<{ rows: UIRow[] - info: any + info?: any hasNextPage: boolean - cursor: any - error: any + cursor?: any + error?: any }> /** diff --git a/packages/frontend-core/src/fetch/TableFetch.js b/packages/frontend-core/src/fetch/TableFetch.ts similarity index 96% rename from packages/frontend-core/src/fetch/TableFetch.js rename to packages/frontend-core/src/fetch/TableFetch.ts index 777d16aa45..0615f83dc2 100644 --- a/packages/frontend-core/src/fetch/TableFetch.js +++ b/packages/frontend-core/src/fetch/TableFetch.ts @@ -14,7 +14,7 @@ export default class TableFetch extends DataFetch { async getData() { const { datasource, limit, sortColumn, sortOrder, sortType, paginate } = this.options - const { tableId } = datasource + const { tableId } = datasource! const { cursor, query } = get(this.store) // Search table diff --git a/packages/types/src/ui/stores/grid/fetch.ts b/packages/types/src/ui/stores/grid/fetch.ts index 0be9ca17b4..772e68eb14 100644 --- a/packages/types/src/ui/stores/grid/fetch.ts +++ b/packages/types/src/ui/stores/grid/fetch.ts @@ -1,6 +1,8 @@ import { Row, + SearchFilters, SortOrder, + SortType, Table, UIDatasource, UILegacyFilter, @@ -15,6 +17,19 @@ export interface UIFetchAPI { loading: any loaded: boolean + searchTable( + tableId: string, + arg1: { + query: SearchFilters | null + limit: number + sort: string | null + sortOrder: string + sortType: SortType | null + paginate: boolean + bookmark: null + } + ): any + resetKey: string | null error: any