This repository was archived by the owner on Jan 30, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const availableFields: FieldDefinition[] = [
1616 { id : '1242142773' , label : 'Service Type' } ,
1717 { id : '1242142774' , label : 'Agreement Jurisdiction' } ,
1818 { id : '1242142775' , label : 'Company Address' } ,
19- { id : '1242142776' , label : 'Signature' } ,
19+ { id : '1242142776' , label : 'Signature' , mode : 'block' } ,
2020] ;
2121
2222export function App ( ) {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export const FieldMenu: React.FC<FieldMenuProps> = ({
6161 const newField : FieldDefinition = {
6262 id : `custom_${ Date . now ( ) } ` ,
6363 label : trimmedName ,
64- metadata : { mode : fieldMode } ,
64+ mode : fieldMode ,
6565 } ;
6666
6767 try {
@@ -416,7 +416,7 @@ export const FieldMenu: React.FC<FieldMenuProps> = ({
416416 flexShrink : 0 ,
417417 } }
418418 >
419- { field . metadata ?. mode || 'inline' }
419+ { field . mode || 'inline' }
420420 </ span >
421421 </ div >
422422 ) ) }
Original file line number Diff line number Diff line change @@ -491,13 +491,13 @@ const SuperDocTemplateBuilder = forwardRef<
491491 menuTriggerFromRef . current = null ;
492492 resetMenuFilter ( ) ;
493493
494- const mode = ( field . metadata ?. mode as 'inline' | 'block' ) || 'inline' ;
494+ const mode = field . mode || 'inline' ;
495495
496496 if ( field . id . startsWith ( 'custom_' ) && onFieldCreate ) {
497497 const createdField = await onFieldCreate ( field ) ;
498498
499499 if ( createdField ) {
500- const createdMode = ( createdField . metadata ?. mode as 'inline' | 'block' ) || mode ;
500+ const createdMode = createdField . mode || mode ;
501501 insertFieldInternal ( createdMode , {
502502 alias : createdField . label ,
503503 metadata : createdField . metadata ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export interface FieldDefinition {
55 label : string ;
66 defaultValue ?: string ;
77 metadata ?: Record < string , any > ;
8+ mode ?: 'inline' | 'block' ;
89 group ?: string ;
910}
1011
You can’t perform that action at this time.
0 commit comments