Skip to content

Commit f1ab35e

Browse files
Merge pull request #1340 from OpenSignLabs/mobile-issue
fix: issue of assigned signer gets deselected in mobile view
2 parents 364d96e + 240d892 commit f1ab35e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

apps/OpenSign/src/components/pdf/Placeholder.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,21 +331,16 @@ function Placeholder(props) {
331331
//condition for only placeholder and template flow
332332
if (props.data && props?.pos?.type !== textWidget) {
333333
props.setUniqueId(props?.data?.Id);
334-
const checkIndex = props.xyPostion.findIndex(
335-
(data) => data.Id === props.data.Id
336-
);
337-
334+
const checkIndex = props.xyPostion
335+
.filter((data) => data.Role !== "prefill")
336+
.findIndex((data) => data.Id === props.data.Id);
338337
props.setIsSelectId(checkIndex || 0);
339338
}
340339
//condition to handle in placeholder and template flow for text widget signerId for text widgets i have to set uniqueId in tempSignerId because
341340
//it does not have any signer user and any signerobjId
342341
else if (props.data && props.pos.type === textWidget) {
343342
props.setTempSignerId(props.uniqueId);
344343
props.setUniqueId(props?.data?.Id);
345-
const checkIndex = props.xyPostion.findIndex(
346-
(data) => data.Id === props.data.Id
347-
);
348-
props.setIsSelectId(checkIndex || 0);
349344
}
350345
props.setSignKey(props.pos.key);
351346
props.setWidgetType(props.pos.type);

0 commit comments

Comments
 (0)