From 240d892b94b91046dc10a451ef8c479915b54c47 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Mon, 14 Oct 2024 17:09:16 +0530 Subject: [PATCH] fix: issue of assigned signer gets deselected in mobile view --- apps/OpenSign/src/components/pdf/Placeholder.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/OpenSign/src/components/pdf/Placeholder.js b/apps/OpenSign/src/components/pdf/Placeholder.js index 82290b0cc6..c3806a88c3 100644 --- a/apps/OpenSign/src/components/pdf/Placeholder.js +++ b/apps/OpenSign/src/components/pdf/Placeholder.js @@ -331,10 +331,9 @@ function Placeholder(props) { //condition for only placeholder and template flow if (props.data && props?.pos?.type !== textWidget) { props.setUniqueId(props?.data?.Id); - const checkIndex = props.xyPostion.findIndex( - (data) => data.Id === props.data.Id - ); - + const checkIndex = props.xyPostion + .filter((data) => data.Role !== "prefill") + .findIndex((data) => data.Id === props.data.Id); props.setIsSelectId(checkIndex || 0); } //condition to handle in placeholder and template flow for text widget signerId for text widgets i have to set uniqueId in tempSignerId because @@ -342,10 +341,6 @@ function Placeholder(props) { 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);