API
Demo
Custom fields
It's possible to create custom views. All it takes is a configuration function and a view.
TODO
Types
export namespace
Field
{
export type
List
<
T
,
Q
=
T
>
=
Field
<
Array
<
T
>
,
ListMutator
<
T
>
,
Q
>
export type
Record
<
T
,
Q
=
T
>
=
Field
<
T
,
RecordMutator
<
T
>
,
Q
>
export type
Scalar
<
T
,
Q
=
T
>
=
Field
<
T
,
{
}
,
Q
>
export type
Text
<
T
,
Q
=
T
>
=
Field
<
TextDoc
<
T
>
,
RichTextMutator
<
T
>
,
Q
>
export function
withView
<
V
,
M
,
Q
,
F
extends
Field
<
V
,
M
,
Q
,
F
>
,
C
extends
{
}
>
(
create
:
C
,
view
:
FieldRenderer
<
V
,
M
,
F
>
)
:
C
}
export interface
Field
<
V
=
any
,
M
=
any
,
Q
=
V
>
{
label
:
Label
shape
:
Shape
<
V
,
M
>
view
:
FieldRenderer
<
V
,
M
,
Field
<
V
,
M
,
Q
>
>
query
<
P
>
(
field
:
Expr
<
V
>
,
pages
:
Pages
<
P
>
)
:
undefined
|
Expr
<
Q
>
}
Value
export type
FieldRenderer
<
V
,
M
,
F
>
=
ComponentType
<
{
field
:
F
state
:
InputState
<
readonly
[
V
,
M
]
>
}
>
Color
Introduction