Skip to content

Commit 71d7a12

Browse files
committed
fix: column widths
1 parent af0471e commit 71d7a12

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/components/PaginatedTable/requestBatcher.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type {BaseQueryFn} from '@reduxjs/toolkit/query';
2-
31
import type {FetchData, PaginatedTableData, SortParams} from './types';
42

53
interface PaginatedTableParams<T, F> {
@@ -156,6 +154,7 @@ class RequestBatcher {
156154
const chunkData = batchResponse.data.slice(startIndex, endIndex);
157155

158156
const chunkResponse: PaginatedTableData<T> = {
157+
...batchResponse,
159158
data: chunkData,
160159
total: batchResponse.total,
161160
found: batchResponse.found,
@@ -181,17 +180,3 @@ class RequestBatcher {
181180

182181
// Singleton instance
183182
export const requestBatcher = new RequestBatcher();
184-
185-
// Enhanced base query that uses batching
186-
export const createBatchedBaseQuery = <T, F>(originalBaseQuery: BaseQueryFn): BaseQueryFn => {
187-
return async (args, api, extraOptions) => {
188-
// Check if this is a fetchTableChunk request
189-
if (typeof args === 'object' && args && 'fetchData' in args) {
190-
const params = args as PaginatedTableParams<T, F>;
191-
return await requestBatcher.queueRequest(params);
192-
}
193-
194-
// For non-batchable requests, use original base query
195-
return originalBaseQuery(args, api, extraOptions);
196-
};
197-
};

0 commit comments

Comments
 (0)