mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
bugfix don't show half created recipient
This commit is contained in:
@ -17,7 +17,9 @@ export default function PDFEditor(props: any) {
|
|||||||
const [fields, setFields] = useState<any[]>(props.document.Field);
|
const [fields, setFields] = useState<any[]>(props.document.Field);
|
||||||
const [selectedRecipient, setSelectedRecipient]: any = useState();
|
const [selectedRecipient, setSelectedRecipient]: any = useState();
|
||||||
const [selectedFieldType, setSelectedFieldType] = useState();
|
const [selectedFieldType, setSelectedFieldType] = useState();
|
||||||
const noRecipients = props?.document.Recipient.length === 0;
|
const noRecipients =
|
||||||
|
props?.document.Recipient.length === 0 ||
|
||||||
|
props?.document.Recipient.every((e: any) => !e.email);
|
||||||
const [adding, setAdding] = useState(false);
|
const [adding, setAdding] = useState(false);
|
||||||
|
|
||||||
function onPositionChangedHandler(position: any, id: any) {
|
function onPositionChangedHandler(position: any, id: any) {
|
||||||
@ -84,6 +86,7 @@ export default function PDFEditor(props: any) {
|
|||||||
selectedRecipient={selectedRecipient}
|
selectedRecipient={selectedRecipient}
|
||||||
onChange={setSelectedFieldType}
|
onChange={setSelectedFieldType}
|
||||||
/>
|
/>
|
||||||
|
{fields.length}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user