Type tablefetch

This commit is contained in:
Adria Navarro 2025-01-02 10:23:39 +01:00
parent ecfc248e60
commit d7cfd51caf
3 changed files with 19 additions and 4 deletions

View File

@ -322,10 +322,10 @@ export default abstract class DataFetch {
abstract getData(): Promise<{ abstract getData(): Promise<{
rows: UIRow[] rows: UIRow[]
info: any info?: any
hasNextPage: boolean hasNextPage: boolean
cursor: any cursor?: any
error: any error?: any
}> }>
/** /**

View File

@ -14,7 +14,7 @@ export default class TableFetch extends DataFetch {
async getData() { async getData() {
const { datasource, limit, sortColumn, sortOrder, sortType, paginate } = const { datasource, limit, sortColumn, sortOrder, sortType, paginate } =
this.options this.options
const { tableId } = datasource const { tableId } = datasource!
const { cursor, query } = get(this.store) const { cursor, query } = get(this.store)
// Search table // Search table

View File

@ -1,6 +1,8 @@
import { import {
Row, Row,
SearchFilters,
SortOrder, SortOrder,
SortType,
Table, Table,
UIDatasource, UIDatasource,
UILegacyFilter, UILegacyFilter,
@ -15,6 +17,19 @@ export interface UIFetchAPI {
loading: any loading: any
loaded: boolean 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 resetKey: string | null
error: any error: any