Form

Type: React component

Aggregates values and feedback returned from child form components. The child form components don't have to be direct children of the form. It's recommended to use FormRow components as direct children since Form also serves as a styling container for FormRow components, preserving the vertical spacing between these components.

When using Form, it's required to implement the "name" prop on your form components. This name will be used in "feedbackByName" and "valueByName".

Props

  1. children

    (Optional)

    Type: ReactNode

  2. feedbackByName

    (Optional)

    Default value

  3. labelPosition

    (Optional)

    Default value

  4. isScrollContainer

    (Optional)

    Default value

  5. onChange

    (Optional)

    Type: Function

    Deprecated!

    Use onFieldChange instead. onChange causes issues with dynamic forms when fields are added or removed in batches.

    A callback that is called whenever a component's value changes.

    This callback is called just before the "validate" prop callback is called.

    Use this callback to update local state which in turn should update the value prop of the component whose callback just fired.

    Arguments

    Default value

  6. onFieldBlur

    (Optional)

    Type: Function

    A callback that is called whenever a component is being blurred (loses its focused state).

    Arguments

    Default value

  7. onFieldChange

    (Optional)

    Type: Function

    A callback that is called whenever a component's value changes.

    This callback is called just before the "validate" prop callback is called.

    Use this callback to update local state which in turn should update the value prop of the component whose callback just fired.

    Arguments

    Default value

  8. onFieldFocus

    (Optional)

    Type: Function

    A callback that is called whenever a component is being focused..

    Arguments

    Default value

  9. onInitialize

    (Optional)

    Type: Function

    Default value

  10. paddingSize

    (Optional)

    Default value

  11. spaceVerticalSize

    (Optional)

    Default value

  12. valueByName

    (Optional)

    Default value