Explorar el Código

refactor & perf: declare const object outside component `ConstantField` (#17495)

tags/1.2.0
yusheng chen hace 6 meses
padre
commit
bf69b97639
No account linked to committer's email address

+ 3
- 1
web/app/components/workflow/nodes/_base/components/variable/constant-field.tsx Ver fichero

@@ -15,8 +15,10 @@ type Props = {
onChange: (value: string | number, varKindType: VarKindType, varInfo?: Var) => void
}

const DEFAULT_SCHEMA = {} as CredentialFormSchema

const ConstantField: FC<Props> = ({
schema = {} as CredentialFormSchema,
schema = DEFAULT_SCHEMA,
readonly,
value,
onChange,

Cargando…
Cancelar
Guardar