Skip to content

Latest commit

 

History

History
84 lines (44 loc) · 1.95 KB

FieldProps.md

File metadata and controls

84 lines (44 loc) · 1.95 KB

@lynxts/coreDocs


@lynxts/core / FieldProps

Interface: FieldProps<T, K, D>

The props of the ArrayField component.

Type Parameters

T extends Struct

struct type of the form values

K extends Path<T, ValueByPath<T, K>>

the path type of the field

D extends Optional<ValueByPath<T, K>>

the default type to use in case of fallback

Properties

children()

children: (props) => ReactNode

Parameters

props: FieldRenderProps<T, K, D>

the render props same as useField result

Returns

ReactNode

a React.js node

Defined in

components/Field.component.tsx:54


deps?

optional deps: DependencyList

The children render result is memoized in this component and it will only change if the field value or its validation props changes. This prop lets you add an additional dependency list to that memoization, so you can add external state changes when required.

Defined in

components/Field.component.tsx:61


fallback?

optional fallback: D

optional default value the field should take

Defined in

components/Field.component.tsx:65


path

path: K

the path of the field in T

Defined in

components/Field.component.tsx:69