🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
fix: radio button options and selecting issue
RaktimaNXGef68fe1c85a8
diff --git a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.jsindex 715bfc9ee..dd9f5d966 100644--- a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js+++ b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js@@ -206,7 +206,7 @@ function Placeholder(props) {props.setWidgetType(props.pos.type);props.setCurrWidgetsDetails(props.pos);}}- class="fa-solid fa-gear settingIcon"+ className="fa-solid fa-gear settingIcon"style={{color: "#188ae2",right:@@ -277,7 +277,7 @@ function Placeholder(props) {}}><i- class="fa-solid fa-gear settingIcon"+ className="fa-solid fa-gear settingIcon"style={{color: "#188ae2",fontSize: "14px"@@ -423,7 +423,7 @@ function Placeholder(props) {props.pos.type !== "radio"? true: false- : true,+ : props.pos.type !== "radio" && true,bottomLeft: false,topLeft: false}}@@ -499,7 +499,7 @@ function Placeholder(props) {: props.isSignYourself && handlePlaceholderClick();}}>- {props.isShowBorder ? (+ {props.isShowBorder && props.pos.type !== "radio" ? (<BorderResizeright={(props.pos.type === "checkbox" || props.pos.type === "radio") &&@@ -522,7 +522,7 @@ function Placeholder(props) {<></>)) : (- <BorderResize />+ props.pos.type !== "radio" && <BorderResize />)}{props.isShowBorder && (diff --git a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholderType.js b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholderType.jsindex 9e41d19f1..8cc478cd1 100644--- a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholderType.js+++ b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholderType.js@@ -553,7 +553,8 @@ function PlaceholderType(props) {// height: props.pos.Height,display: "flex",justifyContent: "center",- marginBottom: "3px"+ marginBottom: "6px",+ marginTop: "5px"}}type="radio"checked={isCheckedRadio.selectValue === data}diff --git a/microfrontends/SignDocuments/src/utils/Utils.js b/microfrontends/SignDocuments/src/utils/Utils.jsindex 91e3bc440..65f036729 100644--- a/microfrontends/SignDocuments/src/utils/Utils.js+++ b/microfrontends/SignDocuments/src/utils/Utils.js@@ -370,7 +370,7 @@ export const defaultWidthHeight = (type) => {case "radio":obj = {width: 15,- height: 15+ height: 20};return obj;default:@@ -1058,16 +1058,27 @@ export const multiSignEmbed = async (dropdown.enableReadOnly();} else if (imgData.type === "radio") {const rocketField = form.createRadioGroup(randomboxId);- let addYPosition = 20;- imgData.widgetOption.map((data, ind) => {+ let addYPosition = 18;++ for (let i = 1; i <= imgData?.widgetOption.length; i++) {+ const data = imgData?.widgetOption[i - 1];+ let yPosition;+ if (i > 1) {+ yPosition = yPos(imgData) + addYPosition;+ } else {+ yPosition = yPos(imgData);+ }+rocketField.addOptionToPage(data, page, {x: xPos(imgData),- y: ind === 0 ? yPos(imgData) : yPos(imgData) - addYPosition,+ y: yPosition,width: 11,height: 11});- addYPosition = ind !== 0 && addYPosition + 20;- });+ if (i > 1) {+ addYPosition = addYPosition + 18;+ }+ }rocketField.select(imgData.widgetValue);rocketField.enableReadOnly();