Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/lib/unstable/core/SchemaRenderer/SchemaRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@ export interface SchemaRendererProps {
config: SchemaRendererConfig;
errorMessages?: ErrorMessages;
mode: SchemaRendererMode;
/**
* The `name` prop must be a non-empty string.
*
* In `final-form` and `react-final-form`, the `name` is used as a key to register
* the field within the form. If you pass an empty string (`name=""`), the field will
* not be registered, its value will not be tracked, and validation will not work.
*
* This can lead to:
* - the field being missing from the form `values`;
* - the `validate` function not being called;
* - no error or touched state updates;
* - inconsistent or broken form behavior.
*
* Always provide a unique, non-empty string for the field name.
*
* @example
* // Incorrect
* <SchemaRenderer name="" {...pros} />
*
* // Correct
* <SchemaRenderer name="params" {...pros} />
*/
name: string;
schema: JsonSchema;
}
Expand Down