Skip to content

Commit c87873c

Browse files
fix: signer list selection issue in request sign flow
1 parent 1776931 commit c87873c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

apps/OpenSign/src/components/shared/fields/SelectSigners.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const SelectSigners = (props) => {
4141
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
4242
...token
4343
};
44-
const searchEmail = inputValue;
44+
const searchEmail = inputValue ? inputValue : "";
4545
const axiosRes = await axios.post(url, { searchEmail }, { headers });
4646
const contactRes = axiosRes?.data?.result || [];
4747
if (contactRes) {
@@ -54,11 +54,9 @@ const SelectSigners = (props) => {
5454
!signerObj.find((item2) => item2.objectId === item1.objectId)
5555
);
5656
};
57-
5857
//get update signer's List if signersdata is present
5958
const updateSignersList =
6059
props?.signersData && compareArrays(res, props?.signersData);
61-
6260
const result = updateSignersList ? updateSignersList : res;
6361
setUserList(result);
6462
return await result.map((item) => ({
@@ -70,7 +68,6 @@ const SelectSigners = (props) => {
7068
console.log("err", error);
7169
}
7270
};
73-
7471
return (
7572
<div className="h-full px-[20px] py-[10px] text-base-content">
7673
<div className="w-full mx-auto p-[8px]">
@@ -87,6 +84,7 @@ const SelectSigners = (props) => {
8784
loadOptions={loadOptions}
8885
onChange={handleOptions}
8986
unstyled
87+
onFocus={() => loadOptions()}
9088
classNames={{
9189
control: () =>
9290
"op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full h-full text-[11px]",

0 commit comments

Comments
 (0)