Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.

Commit 5a324ef

Browse files
committed
feat(io-form): add seedOther property to IoFormArray to attach sub/stuff
1 parent a9b7e1d commit 5a324ef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

projects/ngx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nll/ngx",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"private": false,
55
"peerDependencies": {
66
"@nll/dux": "^2.1.0",

projects/ngx/src/lib/io-form/io-form-array.class.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export class IoFormArray extends FormArray {
2525
seedValue?: any;
2626
seedValidators?: ValidatorFn | ValidatorFn[];
2727
seedAsyncValidators?: AsyncValidatorFn | AsyncValidatorFn[];
28+
seedOther?: (control: AbstractControl) => void;
2829

2930
// Extend patchValue to autoGenerate controls
3031
patchValue(
@@ -55,6 +56,9 @@ export class IoFormArray extends FormArray {
5556
if (this.seedAsyncValidators) {
5657
control.setAsyncValidators(this.seedAsyncValidators);
5758
}
59+
if (this.seedOther) {
60+
this.seedOther(control);
61+
}
5862
this.push(control);
5963
}
6064
}

0 commit comments

Comments
 (0)