@ -39,6 +39,7 @@ export const DrawPDFFields = (props: Props) => {
|
||||
const { selectedFiles, selectedTool, onDrawFieldsChange, users } = props
|
||||
const signers = users.filter((u) => u.role === UserRole.signer)
|
||||
const defaultSignerNpub = signers.length ? hexToNpub(signers[0].pubkey) : ''
|
||||
const [lastSigner, setLastSigner] = useState(defaultSignerNpub)
|
||||
const { to, from } = useScale()
|
||||
|
||||
const [sigitFiles, setSigitFiles] = useState<SigitFile[]>([])
|
||||
@ -117,7 +118,7 @@ export const DrawPDFFields = (props: Props) => {
|
||||
top: to(page.width, y),
|
||||
width: event.pointerType === 'mouse' ? 0 : DEFAULT_START_SIZE.width,
|
||||
height: event.pointerType === 'mouse' ? 0 : DEFAULT_START_SIZE.height,
|
||||
counterpart: defaultSignerNpub,
|
||||
counterpart: lastSigner,
|
||||
type: selectedTool.identifier
|
||||
}
|
||||
|
||||
@ -456,10 +457,14 @@ export const DrawPDFFields = (props: Props) => {
|
||||
<InputLabel id="counterparts">Counterpart</InputLabel>
|
||||
<Select
|
||||
value={
|
||||
drawnField.counterpart || defaultSignerNpub || ''
|
||||
drawnField.counterpart ||
|
||||
lastSigner ||
|
||||
defaultSignerNpub ||
|
||||
''
|
||||
}
|
||||
onChange={(event) => {
|
||||
drawnField.counterpart = event.target.value
|
||||
setLastSigner(event.target.value)
|
||||
refreshPdfFiles()
|
||||
}}
|
||||
labelId="counterparts"
|
||||
|
Loading…
Reference in New Issue
Block a user