Fix onAddClick signature in ArrayFieldTemplate (#775)

According to https://github.com/mozilla-services/react-jsonschema-form/blob/master/src/components/fields/ArrayField.js#L224 `onAddClick` is not returning function as specified in the documentation.
This commit is contained in:
Tomasz Cichocinski
2018-01-10 20:43:41 +01:00
committed by Ethan Glasser-Camp
parent 9aaaf48d90
commit 7654b24f9d

View File

@@ -890,7 +890,7 @@ The following props are passed to each `ArrayFieldTemplate`:
- `disabled`: A boolean value stating if the array is disabled.
- `idSchema`: Object
- `items`: An array of objects representing the items in the array. Each of the items represent a child with properties described below.
- `onAddClick: (event) => (event) => void`: Returns a function that adds a new item to the array.
- `onAddClick: (event) => void`: A function that adds a new item to the array.
- `readonly`: A boolean value stating if the array is read-only.
- `required`: A boolean value stating if the array is required.
- `schema`: The schema object for this array.