docs: update astro-reactive-form readme (#72)
* docs: update astro-reactive-form readme * docs: formatting
This commit is contained in:
parent
0acc1968c1
commit
06f53bc78f
1 changed files with 13 additions and 6 deletions
|
@ -62,16 +62,24 @@ userNameControl?.setValue("RAMOOOON");
|
|||
form.get('is-awesome')?.setValue("checked");
|
||||
---
|
||||
|
||||
<!-- the formGroups attribute takes an array of FormGroup-->
|
||||
<Form formGroups={[form]} />
|
||||
|
||||
<!--
|
||||
the `formGroups` attribute can take a single FormGroup
|
||||
or an array of FormGroup for multiple fieldsets;
|
||||
we do a single for now in this example
|
||||
-->
|
||||
<Form
|
||||
formGroups={form}
|
||||
submitControl={{
|
||||
type: "submit",
|
||||
name: "submit",
|
||||
}}
|
||||
/>
|
||||
```
|
||||
|
||||
# Screenshots
|
||||
|
||||
Result of example above:
|
||||
|
||||
<img width="535" alt="Screen Shot 2022-10-01 at 7 29 00 PM" src="https://user-images.githubusercontent.com/4262489/193421174-5c604aca-7d16-4cd6-a7b1-f5b8752c838e.png">
|
||||

|
||||
|
||||
Example of multiple form groups:
|
||||
|
||||
|
@ -92,7 +100,6 @@ Currently this only supports very basic form creation, but the goal of the proje
|
|||
1. FormControl class
|
||||
1. `statusChanges` - observable that emits the control status when it changes
|
||||
1. `valueChanges` - observable that emits the control value when it changes
|
||||
1. `value` - property that reflects the control value
|
||||
1. Documentation website
|
||||
|
||||
... and so much more
|
||||
|
|
Loading…
Reference in a new issue