diff --git a/packages/frontend-core/src/fetch/DataFetch.ts b/packages/frontend-core/src/fetch/DataFetch.ts index 14d10db099..62e6c2423d 100644 --- a/packages/frontend-core/src/fetch/DataFetch.ts +++ b/packages/frontend-core/src/fetch/DataFetch.ts @@ -44,17 +44,14 @@ interface DataFetchDerivedStore supportsPagination: boolean } -export interface DataFetchParams< - TDatasource, - TQuery = SearchFilters | undefined -> { +export interface DataFetchParams { API: APIClient datasource: TDatasource query: TQuery options?: Partial> } -export interface DataFetchOptions { +export interface DataFetchOptions { // Search config filter: UISearchFilter | LegacyFilter[] | null query: TQuery @@ -272,6 +269,7 @@ export default abstract class BaseDataFetch< // Build the query let query = this.options.query + if (!query) { query = buildQuery(filter ?? undefined) as TQuery } @@ -435,7 +433,7 @@ export default abstract class BaseDataFetch< * Resets the data set and updates options * @param newOptions any new options */ - async update(newOptions: Partial>) { + async update(newOptions: Partial>) { // Check if any settings have actually changed let refresh = false for (const [key, value] of Object.entries(newOptions || {})) {