@maif/react-forms 1.0.15 → 1.0.16
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/README.md +3 -3
- package/dist/react-form.js +1 -1
- package/lib/form.js +9 -7
- package/lib/inputs/CodeInput.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ export const Example = () => {
|
|
|
67
67
|
- **format**: Over the type you can display a special format for the field. It provided by the imported object `format` or just a string
|
|
68
68
|
- `select`: display a [react-select](https://react-select.com/home) field with provided options
|
|
69
69
|
- `buttonsSelect`: display a buttons group, drawn with the same options than the format `select`
|
|
70
|
-
- `code`: if the type is `string`, display a code input (draw with [react-ace](https://github.com/securingsincity/react-ace))
|
|
70
|
+
- `code`: if the type is `string`, display a code input (draw with [react-ace](https://github.com/securingsincity/react-ace)) (add a props.setRef to get ace editor ref)
|
|
71
71
|
- `markdown`: if the type is `string`, display a markdown input
|
|
72
72
|
- `text`: if the type is `string`, display a textarea
|
|
73
73
|
- `email`: if the type is `string`, display an email input
|
|
@@ -86,7 +86,7 @@ export const Example = () => {
|
|
|
86
86
|
- **defaultKeyValue**: if the format is setup to object, this default key/value is set for all added entries
|
|
87
87
|
- **visible**: a boolean option to hide/display form field. It can be an object with `ref` property to get a value by reference an a key `test` as a function to test it. if there is no `test` key, it's base just on boolean value of the reference.
|
|
88
88
|
- **disabled**: A boolean option to enable/disable form field
|
|
89
|
-
- **label**: The label of form field
|
|
89
|
+
- **label**: The label of form field (you can pass `null` to not render a label)
|
|
90
90
|
- **placeholder**: the placeholder of form field
|
|
91
91
|
- **defaultValue**: A default value to fill field by default
|
|
92
92
|
- **help**: the text display hover a help button
|
|
@@ -96,7 +96,7 @@ export const Example = () => {
|
|
|
96
96
|
```javascript
|
|
97
97
|
({rawValues, value, onChange, error}) => <input type="text" className="is-invalid" value={value} onChange={e => onChange(e.target.value)} />
|
|
98
98
|
```
|
|
99
|
-
- **props**: a json object merged with default props. For exemple, if format `select` is setup, you can add all [props](https://react-select.com/props) to
|
|
99
|
+
- **props**: a json object merged with default props. For exemple, if format `select` is setup, you can add all [props](https://react-select.com/props) to customize react-select
|
|
100
100
|
- **options**: An array of options for the select field (if format `select` is setup)
|
|
101
101
|
- **optionsFrom**: A url to fetch array of options for the select field (if format `select` is setup)
|
|
102
102
|
- **transformer**: A function to transform options to a valid format for react select, by default the code try to do it himself.
|