From cebcb113666530ac4d6fa5f3b075807c9e843a82 Mon Sep 17 00:00:00 2001 From: vishnuszipstack Date: Tue, 17 Dec 2024 15:50:03 +0530 Subject: [PATCH] required field text changes as per the feedback --- .../src/components/custom-tools/pdf-viewer/PdfViewer.jsx | 2 +- frontend/src/components/custom-tools/prompt-card/Header.jsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/custom-tools/pdf-viewer/PdfViewer.jsx b/frontend/src/components/custom-tools/pdf-viewer/PdfViewer.jsx index 3b2e321ca..9103184f6 100644 --- a/frontend/src/components/custom-tools/pdf-viewer/PdfViewer.jsx +++ b/frontend/src/components/custom-tools/pdf-viewer/PdfViewer.jsx @@ -21,7 +21,7 @@ function PdfViewer({ fileUrl, highlightData }) { const { jumpToPage } = pageNavigationPluginInstance; const parentRef = useRef(null); function removeZerosAndDeleteIfAllZero(highlightData) { - return highlightData.filter((innerArray) => + return highlightData?.filter((innerArray) => innerArray.some((value) => value !== 0) ); // Keep arrays that contain at least one non-zero value } diff --git a/frontend/src/components/custom-tools/prompt-card/Header.jsx b/frontend/src/components/custom-tools/prompt-card/Header.jsx index 28f90aa31..97b4a37cb 100644 --- a/frontend/src/components/custom-tools/prompt-card/Header.jsx +++ b/frontend/src/components/custom-tools/prompt-card/Header.jsx @@ -111,7 +111,7 @@ function Header({ checked={required === "all"} onChange={() => handleRequiredChange("all")} > - Required + Value Required )} {enforceType === "json" && ( @@ -120,13 +120,13 @@ function Header({ checked={required === "all"} onChange={() => handleRequiredChange("all")} > - All Required + All JSON Values Required handleRequiredChange("any")} > - Any Required + Atleast 1 JSON Value Required )}