File tree Expand file tree Collapse file tree
apps/web/src/components/workflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export function NumberField({
1212 onChange,
1313 onClear,
1414 value,
15+ autoFocus,
1516} : FieldProps ) {
1617 // Convert to string and check for meaningful value (empty strings are considered "no value")
1718 const stringValue = String ( value ?? "" ) ;
@@ -29,7 +30,7 @@ export function NumberField({
2930 className = { cn (
3031 "rounded-md border border-neutral-300 dark:border-neutral-700"
3132 ) }
32- autoFocus
33+ autoFocus = { autoFocus }
3334 />
3435 { ! disabled && clearable && hasValue && (
3536 < ClearButton
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export interface PropertyFieldProps {
5353 disabled ?: boolean ;
5454 connected ?: boolean ;
5555 createObjectUrl : ( objectReference : ObjectReference ) => string ;
56+ autoFocus ?: boolean ;
5657}
5758
5859export function PropertyField ( {
@@ -65,6 +66,7 @@ export function PropertyField({
6566 disabled = false ,
6667 connected = false ,
6768 createObjectUrl,
69+ autoFocus = false ,
6870} : PropertyFieldProps ) {
6971 return (
7072 < div className = "text-sm space-y-1" >
@@ -124,6 +126,7 @@ export function PropertyField({
124126 connected = { connected }
125127 createObjectUrl = { createObjectUrl }
126128 className = "w-full"
129+ autoFocus = { autoFocus }
127130 />
128131 </ div >
129132 </ div >
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export function TextField({
1212 onChange,
1313 onClear,
1414 value,
15+ autoFocus,
1516} : FieldProps ) {
1617 // Convert to string and check for meaningful value (empty strings are considered "no value")
1718 const stringValue = String ( value ?? "" ) ;
@@ -28,7 +29,7 @@ export function TextField({
2829 "resize-y rounded-md border border-neutral-300 dark:border-neutral-700"
2930 ) }
3031 disabled = { disabled }
31- autoFocus
32+ autoFocus = { autoFocus }
3233 />
3334 { ! disabled && clearable && hasValue && (
3435 < ClearButton
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export interface FieldProps {
1111 disabled ?: boolean ;
1212 connected ?: boolean ;
1313 clearable ?: boolean ;
14+ autoFocus ?: boolean ;
1415}
1516
1617export interface FileFieldProps extends FieldProps {
Original file line number Diff line number Diff line change @@ -568,6 +568,7 @@ export const WorkflowNode = memo(
568568 disabled = { disabled }
569569 connected = { isInputConnected }
570570 createObjectUrl = { data . createObjectUrl }
571+ autoFocus
571572 />
572573 ) ;
573574 } ) ( ) }
You can’t perform that action at this time.
0 commit comments