MultipleValuesInput

Type: React component

Wraps a form field to allow adding multiple values with that same component. Renders a button allowing the user to add new values, which will cause another row to appear with the provided form component. Eventually input of all values is aggregated into a single array and is passed to the onChange prop.

Props

  1. addButtonLabel

    (Optional)

    Type: String

    The human readable label which should be presented inside the "add" button.

    Default value

  2. initialValue

    (Optional)

    Type: Any

    The initial value of the component when adding it using the "add" button.

    Default value

  3. isDisabled

    (Optional)

    Default value

  4. name

    (Optional)

    Type: FDS~Name

    Default value

  5. onChange

    (Optional)

    Default value

  6. placeholder

    (Optional)

    Default value

  7. renderFormField

    (Required)

    Type: Function

    A callback that is called for each value in the values array, which should return a form field instance.

    Arguments

  8. tooltipContent

    (Optional)

    Default value

  9. validate

    (Optional)

    Default value

  10. values

    (Required)

    Type: Array<FDS~Value>

    Default value