mui-dataforms
Advanced tools
Comparing version 0.1.1-19 to 0.1.1-20
{ | ||
"name": "mui-dataforms", | ||
"version": "0.1.1-19", | ||
"version": "0.1.1-20", | ||
"description": "Dynamically generated data forms for use with Material-UI ", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -53,3 +53,3 @@ ## Material-UI Dataforms | ||
const handleOnChange = (key) => (value) => { | ||
setValues(prevValues => ({[key]: value, ...prevValues})) | ||
setValues(prevValues => ({...prevValues, [key]: value})) | ||
} | ||
@@ -73,7 +73,7 @@ ``` | ||
|**`title`**|string|`''`|false|Title of the form | ||
|**`fields`**|array|`[]`|true|Data used to describe the fields. Array of `section` objects. | ||
|**`fields`**|array|`[]`|true|Data used to describe the fields. Array of [`section`](#options-section) objects. | ||
|**`values`**|object|`{}`|false|Object containing the values of the form. Each value's key is linked to the `id` of the relative field. | ||
|**`onChange`**|function||true|A function that will be triggered when the field changes. <br />`function(value) => ()` | ||
|**`onChange`**|function||true|A function that will be triggered when the field changes. <br />`key => value => ()` | ||
#### section: | ||
#### <a name="options-section"></a>section: | ||
|Name|Type|Default|Required|Description | ||
@@ -83,6 +83,6 @@ |:--:|:-----|:--|:-----|:-----| | ||
|**`description`**|string|`''`|false|Description of the section. | ||
|**`fields`**|array|`[]`|false|Fields for the section. Array of `field` objects. | ||
|**`fields`**|array|`[]`|false|Fields for the section. Array of [`field`](#options-field) objects. | ||
#### field: | ||
#### <a name="options-field"></a>field: | ||
|Name|Type|Default|Required|Description | ||
@@ -89,0 +89,0 @@ |:--:|:-----|:--|:-----|:-----| |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
30010
0