From 81d9982ea562a719b5dcd8283842a876155a7ee1 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 6 Sep 2024 09:31:53 +0530 Subject: [PATCH] feat: include pagination in addListStep --- src/context/browserSteps.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/context/browserSteps.tsx b/src/context/browserSteps.tsx index bdb0d298..d348ff35 100644 --- a/src/context/browserSteps.tsx +++ b/src/context/browserSteps.tsx @@ -66,14 +66,15 @@ export const BrowserStepsProvider: React.FC<{ children: React.ReactNode }> = ({ const existingListStep = updatedSteps[existingListStepIndex] as ListStep; updatedSteps[existingListStepIndex] = { ...existingListStep, - fields: { ...existingListStep.fields, ...newFields } + fields: { ...existingListStep.fields, ...newFields }, + pagination: pagination }; return updatedSteps; } else { // Create a new ListStep return [ ...prevSteps, - { id: listId, type: 'list', listSelector, fields: newFields } + { id: listId, type: 'list', listSelector, fields: newFields, pagination } ]; } });