@maif/react-forms 1.0.20 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +1 -1
- package/README.md +5 -0
- package/dist/react-form.js +1 -1
- package/lib/form.js +239 -70
- package/lib/inputs/Collapse.js +1 -1
- package/lib/inputs/SelectInput.js +5 -2
- package/lib/style.d.ts +9 -2
- package/lib/style.js +7 -2
- package/lib/styleContext.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,6 +92,10 @@ export const Example = () => {
|
|
|
92
92
|
- **help**: the text display hover a help button
|
|
93
93
|
- **className**: you can customize classnames of field,
|
|
94
94
|
- **style**: to styling a field, you can provide a json object with css
|
|
95
|
+
- **onChange**: a callback function to the value change.
|
|
96
|
+
```javascript
|
|
97
|
+
({rawValues, value, setValue}) => if (value.length) { setValue('entry', false) }
|
|
98
|
+
```
|
|
95
99
|
- **render**: a function to completely custom the rendering of form field
|
|
96
100
|
```javascript
|
|
97
101
|
({rawValues, value, onChange, error}) => <input type="text" className="is-invalid" value={value} onChange={e => onChange(e.target.value)} />
|
|
@@ -185,6 +189,7 @@ httpClient = {(url, method) => fetch(url, {
|
|
|
185
189
|
}
|
|
186
190
|
})}
|
|
187
191
|
```
|
|
192
|
+
- **watch**: a boolean to activate the automatic log of form value. A function can be set up to override the default logger.
|
|
188
193
|
- **autosubmit**: a boolean to activate the automatic run of the `onSubmit` form properties on every change of values.
|
|
189
194
|
- **actions**: an object to parameter footer buttons key. By default just `submit` button is displayed.
|
|
190
195
|
```javascript
|