From a94ce3a0b2c3cd8c0b468ba080edd5f255eccd29 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 30 Aug 2024 23:59:41 +0530 Subject: [PATCH] feat: handle confirmation of pagination settings --- src/components/organisms/RightSidePanel.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index c5d93ded..9cc78fe4 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -129,6 +129,18 @@ export const RightSidePanel = () => { // updateListStepField(stepId, key, value); // }; + const handleConfirmListCapture = useCallback(() => { + if (!selectedOption) { + setShowListOptions(true); + return; + } + // Proceed to stop capture and emit settings only after option is selected + stopCaptureAndEmitGetListSettings(); + setShowListOptions(false); // Reset options display + setSelectedOption(null); // Reset selected option + }, [selectedOption, stopCaptureAndEmitGetListSettings]); + + const captureScreenshot = (fullPage: boolean) => { const screenshotSettings: ScreenshotSettings = { fullPage,