File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/lib/unstable/core/SchemaRenderer Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,28 @@ export interface SchemaRendererProps {
1010 config : SchemaRendererConfig ;
1111 errorMessages ?: ErrorMessages ;
1212 mode : SchemaRendererMode ;
13+ /**
14+ * The `name` prop must be a non-empty string.
15+ *
16+ * In `final-form` and `react-final-form`, the `name` is used as a key to register
17+ * the field within the form. If you pass an empty string (`name=""`), the field will
18+ * not be registered, its value will not be tracked, and validation will not work.
19+ *
20+ * This can lead to:
21+ * - the field being missing from the form `values`;
22+ * - the `validate` function not being called;
23+ * - no error or touched state updates;
24+ * - inconsistent or broken form behavior.
25+ *
26+ * Always provide a unique, non-empty string for the field name.
27+ *
28+ * @example
29+ * // Incorrect
30+ * <SchemaRenderer name="" {...pros} />
31+ *
32+ * // Correct
33+ * <SchemaRenderer name="params" {...pros} />
34+ */
1335 name : string ;
1436 schema : JsonSchema ;
1537}
You can’t perform that action at this time.
0 commit comments