mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 09:12:02 +10:00
feat: copy and paste fields (#1193)
Adds keyboard shortcuts for copying and pasting fields, additionally adds the ability to duplicate a field via the UI.
This commit is contained in:
@ -216,7 +216,10 @@ export const NumberField = ({ field, recipient, onSignField, onUnsignField }: Nu
|
||||
let fieldDisplayName = 'Number';
|
||||
|
||||
if (parsedFieldMeta?.label) {
|
||||
fieldDisplayName = parsedFieldMeta.label.length > 10 ? parsedFieldMeta.label.substring(0, 10) + '...' : parsedFieldMeta.label;
|
||||
fieldDisplayName =
|
||||
parsedFieldMeta.label.length > 10
|
||||
? parsedFieldMeta.label.substring(0, 10) + '...'
|
||||
: parsedFieldMeta.label;
|
||||
}
|
||||
|
||||
const userInputHasErrors = Object.values(errors).some((error) => error.length > 0);
|
||||
@ -246,7 +249,7 @@ export const NumberField = ({ field, recipient, onSignField, onUnsignField }: Nu
|
||||
)}
|
||||
>
|
||||
<span className="flex items-center justify-center gap-x-1 text-sm">
|
||||
<Hash className='h-4 w-4' /> {fieldDisplayName}
|
||||
<Hash className="h-4 w-4" /> {fieldDisplayName}
|
||||
</span>
|
||||
</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user