@texaryn/solid 0.2.0 → 0.3.0
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/CHANGELOG.md +15 -0
- package/README.md +14 -1
- package/dist/components/FormRoot.d.ts +1 -0
- package/dist/index.js +377 -379
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @texaryn/solid
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3e79b3e: FormRoot now renders the UI tree without creating a native form. Consumers own
|
|
8
|
+
the form element and connect its submit event to the runtime.
|
|
9
|
+
- 3e79b3e: Give every renderer one localized validation message contract and normalize
|
|
10
|
+
adapter parameters so built-in widgets do not display evaluator diagnostics.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [35cb55f]
|
|
15
|
+
- Updated dependencies [3e79b3e]
|
|
16
|
+
- @texaryn/core@0.16.0
|
|
17
|
+
|
|
3
18
|
## 0.2.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -14,13 +14,26 @@ const schema = await createJsonSchemaAdapter({
|
|
|
14
14
|
},
|
|
15
15
|
})
|
|
16
16
|
const form = createForm(schema, { initialData: { name: '' } })
|
|
17
|
+
function submit(event: SubmitEvent) {
|
|
18
|
+
event.preventDefault()
|
|
19
|
+
form.dispatch({ type: 'Submit' })
|
|
20
|
+
}
|
|
17
21
|
|
|
18
22
|
render(
|
|
19
|
-
() =>
|
|
23
|
+
() => (
|
|
24
|
+
<form noValidate onSubmit={submit}>
|
|
25
|
+
<FormRoot form={form} registry={createDefaultRegistry()} showErrorSummary />
|
|
26
|
+
<button type="submit">Submit</button>
|
|
27
|
+
</form>
|
|
28
|
+
),
|
|
20
29
|
document.getElementById('app')!,
|
|
21
30
|
)
|
|
22
31
|
```
|
|
23
32
|
|
|
33
|
+
`FormRoot` renders the tree only. The application owns the native `<form>` and
|
|
34
|
+
connects its submit event to the runtime, so the tree can also be composed
|
|
35
|
+
inside a larger form.
|
|
36
|
+
|
|
24
37
|
`FormRoot` owns the runtime by default and destroys it when the Solid owner is
|
|
25
38
|
disposed. Set `destroyOnUnmount={false}` when another owner manages the runtime.
|
|
26
39
|
The default registry renders fields, object groups, arrays, validation messages,
|