@micromerce/formbuilder-react 1.0.1023 → 1.0.1024
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
CHANGED
|
@@ -30,6 +30,16 @@ Then run `npm rum watch` to start the formbuilder-react (and changes are automat
|
|
|
30
30
|
The other service should now have access to the local lib.<br>
|
|
31
31
|
Warning `...is not a module.` will be displayed, but can be ignored.
|
|
32
32
|
|
|
33
|
+
## valueGenerator in the browser
|
|
34
|
+
|
|
35
|
+
`custom-attributes.valueGenerator.template` is evaluated live (`useValueGenerator`) with the same
|
|
36
|
+
variables the server (service-entity) gives it: `_` (the entry's values), `$` (the values beside
|
|
37
|
+
the field, in a list the item's) and, in a list item only, `$index` (the item's 0-based index) and
|
|
38
|
+
`$list` (the path of its list: `positions`, `address.lines`, `positions[2].parts`; COP-5113). Outside
|
|
39
|
+
a list item `$index` and `$list` are not defined. Values reach the template as JavaScript values in
|
|
40
|
+
the browser, whether or not the generator sets `jsValues`; write templates that work with both
|
|
41
|
+
(`'' + x`, `+x`), as service-entity's docs recommend.
|
|
42
|
+
|
|
33
43
|
## Validation
|
|
34
44
|
|
|
35
45
|
The form checks itself on submit and shows the error below every invalid field. The browser's
|