You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following props are passed to a custom field template component:
583
+
584
+
-`id`: The id of the field in the hierarchy. You can use it to render a label targetting the wrapped widget;
585
+
-`classNames`: A string containing the base bootstrap CSS classes merged with any [custom ones](#custom-css-class-names) defined in your uiSchema;
586
+
-`label`: The computed label for this field, as a string;
587
+
-`description`: A component instance rendering the field description, if any defined (this will use any [custom `DescriptionField`](#custom-descriptions) defined);
588
+
-`children`: The field or widget component instance for this field row;
589
+
-`errors`: A component instance listing any encountered errors for this field;
590
+
-`help`: A component instance rendering any `ui:help` uiSchema directive defined;
591
+
-`hidden`: A boolean value stating if the field should be hidden;
592
+
-`required`: A boolean value stating if the field is required;
593
+
-`readonly`: A boolean value stating if the field is read-only;
594
+
-`displayLabel`: A boolean value stating if the label should be rendered or not. This is useful for nested fields in arrays where you don't want to clutter the UI.
595
+
596
+
> Note: you can only define a single field template for a form. If you need many, it's probably time to look for [custom fields](#custom-field-components) instead.
597
+
598
+
### Custom widgets and fields
599
+
600
+
The API allows to specify your own custom *widget* and *field* components:
555
601
556
602
- A *widget* represents a HTML tag for the user to enter data, eg. `input`, `select`, etc.
557
603
- A *field* usually wraps one or more widgets and most often handles internal field state; think of a field as a form row, including the labels.
0 commit comments