Skip to content

Commit ea2b497

Browse files
authored
Merge pull request #22 from adrianriepl/master
2 parents 5ba31db + c95a50f commit ea2b497

File tree

6 files changed

+390
-8
lines changed

6 files changed

+390
-8
lines changed

.all-contributorsrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@
5959
"code",
6060
"doc"
6161
]
62+
},
63+
{
64+
"login": "adrianriepl",
65+
"name": "Adrian Riepl",
66+
"avatar_url": "https://avatars2.githubusercontent.com/u/11076678?v=4",
67+
"profile": "https://github.com/adrianriepl",
68+
"contributions": [
69+
"code",
70+
"doc"
71+
]
6272
}
6373
],
6474
"contributorsPerLine": 7

README.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ const nameControl = formsManager.getControl<string>('onboarding', 'name');
149149
touched: boolean,
150150
pristine: boolean,
151151
pending: boolean,
152+
untouched: boolean,
152153
}
153154
```
154155

@@ -170,6 +171,48 @@ formsManager.patchValue('onboarding', value, options);
170171
formsManager.setValue('onboarding', value, options);
171172
```
172173

174+
- `markAllAsTouched()` - A proxy to the original `markAllAsTouched` method
175+
176+
```ts
177+
formsManager.markAllAsTouched('onboarding', options);
178+
```
179+
180+
- `markAsTouched()` - A proxy to the original `markAsTouched` method
181+
182+
```ts
183+
formsManager.markAsTouched('onboarding', options);
184+
```
185+
186+
- `markAllAsDirty()` - Marks the control and all its descendant controls as dirty
187+
188+
```ts
189+
formsManager.markAllAsDirty('onboarding', options);
190+
```
191+
192+
- `markAsDirty()` - A proxy to the original `markAsDirty` method
193+
194+
```ts
195+
formsManager.markAsDirty('onboarding', options);
196+
```
197+
198+
- `markAsPending()` - A proxy to the original `markAsPending` method
199+
200+
```ts
201+
formsManager.markAsPending('onboarding', options);
202+
```
203+
204+
- `markAsPristine()` - A proxy to the original `markAsPristine` method
205+
206+
```ts
207+
formsManager.markAsPristine('onboarding', options);
208+
```
209+
210+
- `markAsUntouched()` - A proxy to the original `markAsUntouched` method
211+
212+
```ts
213+
formsManager.markAsUntouched('onboarding', options);
214+
```
215+
173216
- `unsubscribe()` - Unsubscribe from the form's `valueChanges` observable (always call it on `ngOnDestroy`)
174217

175218
```ts
@@ -396,15 +439,16 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
396439
<!-- markdownlint-disable -->
397440
<table>
398441
<tr>
399-
<td align="center"><a href="https://www.netbasal.com"><img src="https://avatars1.githubusercontent.com/u/6745730?v=4" width="100px;" alt=""/><br /><sub><b>Netanel Basal</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=NetanelBasal" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=NetanelBasal" title="Documentation">📖</a> <a href="#ideas-NetanelBasal" title="Ideas, Planning, & Feedback">🤔</a></td>
400-
<td align="center"><a href="https://github.com/Coly010"><img src="https://avatars2.githubusercontent.com/u/12140467?v=4" width="100px;" alt=""/><br /><sub><b>Colum Ferry</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=Coly010" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=Coly010" title="Documentation">📖</a></td>
401-
<td align="center"><a href="https://github.com/mehmet-erim"><img src="https://avatars0.githubusercontent.com/u/34455572?v=4" width="100px;" alt=""/><br /><sub><b>Mehmet Erim</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=mehmet-erim" title="Documentation">📖</a></td>
402-
<td align="center"><a href="https://github.com/dspeirs7"><img src="https://avatars2.githubusercontent.com/u/739058?v=4" width="100px;" alt=""/><br /><sub><b>David Speirs</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=dspeirs7" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=dspeirs7" title="Documentation">📖</a></td>
403-
<td align="center"><a href="https://github.com/manudss"><img src="https://avatars3.githubusercontent.com/u/1046806?v=4" width="100px;" alt=""/><br /><sub><b>Emmanuel De Saint Steban</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=manudss" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=manudss" title="Documentation">📖</a></td>
442+
<td align="center"><a href="https://www.netbasal.com"><img src="https://avatars1.githubusercontent.com/u/6745730?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Netanel Basal</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=NetanelBasal" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=NetanelBasal" title="Documentation">📖</a> <a href="#ideas-NetanelBasal" title="Ideas, Planning, & Feedback">🤔</a></td>
443+
<td align="center"><a href="https://github.com/Coly010"><img src="https://avatars2.githubusercontent.com/u/12140467?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Colum Ferry</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=Coly010" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=Coly010" title="Documentation">📖</a></td>
444+
<td align="center"><a href="https://github.com/mehmet-erim"><img src="https://avatars0.githubusercontent.com/u/34455572?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mehmet Erim</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=mehmet-erim" title="Documentation">📖</a></td>
445+
<td align="center"><a href="https://github.com/dspeirs7"><img src="https://avatars2.githubusercontent.com/u/739058?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Speirs</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=dspeirs7" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=dspeirs7" title="Documentation">📖</a></td>
446+
<td align="center"><a href="https://github.com/manudss"><img src="https://avatars3.githubusercontent.com/u/1046806?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Emmanuel De Saint Steban</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=manudss" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=manudss" title="Documentation">📖</a></td>
447+
<td align="center"><a href="https://github.com/adrianriepl"><img src="https://avatars2.githubusercontent.com/u/11076678?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adrian Riepl</b></sub></a><br /><a href="https://github.com/ngneat/forms-manager/commits?author=adrianriepl" title="Code">💻</a> <a href="https://github.com/ngneat/forms-manager/commits?author=adrianriepl" title="Documentation">📖</a></td>
404448
</tr>
405449
</table>
406450
407-
<!-- markdownlint-enable -->
451+
<!-- markdownlint-restore -->
408452
<!-- prettier-ignore-end -->
409453
410454
<!-- ALL-CONTRIBUTORS-LIST:END -->

projects/ngneat/forms-manager/src/lib/builders.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export function buildValue(control: Partial<AbstractControl>): Control {
8787
touched: control.touched,
8888
pristine: control.pristine,
8989
pending: control.pending,
90+
untouched: control.untouched,
9091
};
9192

9293
if (control instanceof FormGroup || control instanceof FormArray) {

0 commit comments

Comments
 (0)