!(data && data.length)}
+ noDataCondition={(data) => !dataCount}
reload={reload}
/>
diff --git a/libs/orders/src/lib/components/order-list-manager/use-order-list-data.ts b/libs/orders/src/lib/components/order-list-manager/use-order-list-data.ts
index 53bcf2bfc..4a5200284 100644
--- a/libs/orders/src/lib/components/order-list-manager/use-order-list-data.ts
+++ b/libs/orders/src/lib/components/order-list-manager/use-order-list-data.ts
@@ -79,6 +79,9 @@ export const useOrderListData = ({
timeInForce: filter?.timeInForce?.value,
types: filter?.type?.value,
},
+ pagination: {
+ first: 1000,
+ },
}),
[partyId, marketId, filter]
);
@@ -98,7 +101,6 @@ export const useOrderListData = ({
({
data,
delta,
- totalCount,
}: {
data: (OrderEdge | null)[] | null;
delta?: Order[];
@@ -112,7 +114,10 @@ export const useOrderListData = ({
).length;
}
}
- return updateGridData(dataRef, data, gridRef);
+ if (gridRef.current?.api?.getModel().getType() === 'infinite') {
+ return updateGridData(dataRef, data, gridRef);
+ }
+ return false;
},
[gridRef, scrolledToTop]
);
@@ -126,7 +131,10 @@ export const useOrderListData = ({
totalCount?: number;
}) => {
totalCountRef.current = totalCount;
- return updateGridData(dataRef, data, gridRef);
+ if (gridRef.current?.api?.getModel().getType() === 'infinite') {
+ return updateGridData(dataRef, data, gridRef);
+ }
+ return false;
},
[gridRef]
);
diff --git a/libs/orders/src/lib/components/order-list/order-list.spec.tsx b/libs/orders/src/lib/components/order-list/order-list.spec.tsx
index 2e5d59099..20f66106e 100644
--- a/libs/orders/src/lib/components/order-list/order-list.spec.tsx
+++ b/libs/orders/src/lib/components/order-list/order-list.spec.tsx
@@ -48,7 +48,9 @@ describe('OrderListTable', () => {
await act(async () => {
render(generateJsx({ rowData: [] }));
});
- expect(screen.getByText('No orders')).toBeInTheDocument();
+ expect(() => screen.getByText('No orders')).toThrow(
+ 'Unable to find an element'
+ );
});
it('should render correct columns', async () => {
diff --git a/libs/orders/src/lib/components/order-list/order-list.tsx b/libs/orders/src/lib/components/order-list/order-list.tsx
index 61c6ebde8..c1d2e7ec6 100644
--- a/libs/orders/src/lib/components/order-list/order-list.tsx
+++ b/libs/orders/src/lib/components/order-list/order-list.tsx
@@ -39,10 +39,10 @@ export const OrderListTable = memo(
return (
) => {
if (!data) {
return undefined;
@@ -110,6 +110,7 @@ export const OrderListTable = memo(
)
);
}}
+ minWidth={80}
/>
) => {
if (!order) {
return undefined;
@@ -130,6 +130,7 @@ export const OrderListTable = memo(
if (order?.liquidityProvision) return t('Liquidity provision');
return Schema.OrderTypeMapping[value];
}}
+ minWidth={80}
/>
)}
+ minWidth={100}
/>
);
}}
+ minWidth={150}
/>
);
}}
+ minWidth={150}
/>
) : null;
}}
+ sortable={false}
/>
);
diff --git a/libs/react-helpers/src/hooks/use-bottom-placeholder.tsx b/libs/react-helpers/src/hooks/use-bottom-placeholder.tsx
index 1bce82078..2e0ab70e2 100644
--- a/libs/react-helpers/src/hooks/use-bottom-placeholder.tsx
+++ b/libs/react-helpers/src/hooks/use-bottom-placeholder.tsx
@@ -68,7 +68,7 @@ export const useBottomPlaceholder = ({
isFullWidthRow,
fullWidthCellRenderer,
onSortChanged: onRowsChanged,
- onFilterChange: onRowsChanged,
+ onFilterChanged: onRowsChanged,
}
: {},
[onBodyScrollEnd, onRowsChanged, disabled]
diff --git a/libs/utils/src/lib/generic-data-provider.ts b/libs/utils/src/lib/generic-data-provider.ts
index c03405c06..7a14f1b4c 100644
--- a/libs/utils/src/lib/generic-data-provider.ts
+++ b/libs/utils/src/lib/generic-data-provider.ts
@@ -258,7 +258,16 @@ function makeDataProviderInternal<
client
.query({
query,
- variables: { ...variables, ...(pagination && { pagination }) },
+ variables: {
+ ...variables,
+ ...(pagination && {
+ // let the variables pagination be prior to provider param
+ pagination: {
+ ...pagination,
+ ...(variables?.['pagination'] ?? null),
+ },
+ }),
+ },
fetchPolicy: fetchPolicy || 'no-cache',
context: additionalContext,
errorPolicy: policy || 'none',