diff --git a/apps/OpenSign/src/components/pdf/Placeholder.js b/apps/OpenSign/src/components/pdf/Placeholder.js index 43d42da80..d426b9982 100644 --- a/apps/OpenSign/src/components/pdf/Placeholder.js +++ b/apps/OpenSign/src/components/pdf/Placeholder.js @@ -262,6 +262,10 @@ function Placeholder(props) { if (props.pos.key === props.selectWidgetId) { props.handleLinkUser(props.data.Id); props.setUniqueId(props.data.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + props.setIsSelectId(checkIndex || 0); } } else if (!props.pos.type) { if ( @@ -321,9 +325,19 @@ function Placeholder(props) { if (props.data && props?.pos?.type !== textWidget) { props.setSignerObjId(props?.data?.signerObjId); props.setUniqueId(props?.data?.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + + props.setIsSelectId(checkIndex || 0); } else if (props.data && props.pos.type === textWidget) { props.setTempSignerId(props.uniqueId); props.setUniqueId(props?.data?.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + + props.setIsSelectId(checkIndex || 0); } props.setSignKey(props.pos.key); props.setWidgetType(props.pos.type); @@ -340,10 +354,19 @@ function Placeholder(props) { if (props.data && props?.pos?.type !== textWidget) { props.setSignerObjId(props?.data?.signerObjId); props.setUniqueId(props?.data?.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + + props.setIsSelectId(checkIndex || 0); } else if (props.data && props.pos.type === textWidget) { props.setTempSignerId(props.uniqueId); props.setSignerObjId(props?.data?.signerObjId); props.setUniqueId(props?.data?.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + props.setIsSelectId(checkIndex || 0); } //checking widget's type and open widget copy modal for required widgets @@ -457,11 +480,19 @@ function Placeholder(props) { e.stopPropagation(); props.handleLinkUser(props.data.Id); props.setUniqueId(props.data.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + props.setIsSelectId(checkIndex || 0); }} onTouchEnd={(e) => { e.stopPropagation(); props.handleLinkUser(props.data.Id); props.setUniqueId(props.data.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + props.setIsSelectId(checkIndex || 0); }} style={{ color: "#188ae2", right: "32px", top: "-18px" }} > @@ -483,6 +514,10 @@ function Placeholder(props) { if (props.data) { props.setSignKey(props.pos.key); props.setUniqueId(props.data.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + props.setIsSelectId(checkIndex || 0); } }} onTouchEnd={(e) => { @@ -491,6 +526,10 @@ function Placeholder(props) { if (props.data) { props.setSignKey(props.pos.key); props.setUniqueId(props.data.Id); + const checkIndex = props.xyPostion.findIndex( + (data) => data.Id === props.data.Id + ); + props.setIsSelectId(checkIndex || 0); } }} > diff --git a/apps/OpenSign/src/components/pdf/RecipientList.js b/apps/OpenSign/src/components/pdf/RecipientList.js index b7c3b69d8..926cad468 100644 --- a/apps/OpenSign/src/components/pdf/RecipientList.js +++ b/apps/OpenSign/src/components/pdf/RecipientList.js @@ -113,7 +113,7 @@ const RecipientList = (props) => { } flex flex-row rounded-xl px-2 py-[10px] mt-1 mx-1 items-center last:mb-0.5`} style={{ background: - (!isMobile && isHover === ind) || props.isSelectListId === ind + (!isMobile && isHover === ind) || props.uniqueId === obj.Id ? obj?.blockColor ? obj?.blockColor : color[ind % color.length] diff --git a/apps/OpenSign/src/components/pdf/RenderPdf.js b/apps/OpenSign/src/components/pdf/RenderPdf.js index abc105da7..c14c31a71 100644 --- a/apps/OpenSign/src/components/pdf/RenderPdf.js +++ b/apps/OpenSign/src/components/pdf/RenderPdf.js @@ -57,7 +57,8 @@ function RenderPdf({ setTempSignerId, uniqueId, pdfOriginalWH, - scale + scale, + setIsSelectId }) { const isMobile = window.innerWidth < 767; //check isGuestSigner is present in local if yes than handle login flow header in mobile view @@ -319,6 +320,7 @@ function RenderPdf({ containerWH={containerWH} pdfOriginalWH={pdfOriginalWH} pageNumber={pageNumber} + setIsSelectId={setIsSelectId} /> ); @@ -428,7 +430,7 @@ function RenderPdf({ >
); diff --git a/apps/OpenSign/src/components/pdf/WidgetComponent.js b/apps/OpenSign/src/components/pdf/WidgetComponent.js index 88f9f9818..eb5880297 100644 --- a/apps/OpenSign/src/components/pdf/WidgetComponent.js +++ b/apps/OpenSign/src/components/pdf/WidgetComponent.js @@ -38,7 +38,7 @@ function WidgetComponent({ isTemplateFlow, setBlockColor, setIsAddSigner, - blockColor + uniqueId }) { const [isSignersModal, setIsSignersModal] = useState(false); const [, dropdown] = useDrag({ @@ -255,7 +255,6 @@ function WidgetComponent({ return name; } }; - return ( <> {isMobile ? ( @@ -265,14 +264,13 @@ function WidgetComponent({