@rxdi/forms 0.7.217 → 0.7.218

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.
@@ -16,7 +16,7 @@ export declare class FormArray<T = any> implements AbstractControl<T[]> {
16
16
  private form;
17
17
  private options;
18
18
  private subscriptions;
19
- constructor(controls?: AbstractControl<T>[], nameOrOptions?: string | FormArrayOptions<T>);
19
+ constructor(controls?: AbstractControl<T>[], nameOrOptions?: string | FormArrayOptions<T> | ((value: T) => AbstractControl));
20
20
  get value(): T[];
21
21
  getOptions(): FormArrayOptions<T>;
22
22
  setOptions(options: FormOptions): void;
@@ -23,8 +23,10 @@ class FormArray {
23
23
  if (typeof nameOrOptions === 'string') {
24
24
  this.name = nameOrOptions;
25
25
  }
26
+ else if (typeof nameOrOptions === 'function') {
27
+ this.options = { itemFactory: nameOrOptions };
28
+ }
26
29
  else {
27
- this.name = nameOrOptions.name || '';
28
30
  this.options = nameOrOptions;
29
31
  }
30
32
  this._valueChanges = new rxjs_1.BehaviorSubject(this.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxdi/forms",
3
- "version": "0.7.217",
3
+ "version": "0.7.218",
4
4
  "main": "./dist/index.js",
5
5
  "author": "Kristiyan Tachev",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  "build": "tsc"
13
13
  },
14
14
  "devDependencies": {
15
- "@rxdi/lit-html": "^0.7.216",
15
+ "@rxdi/lit-html": "^0.7.217",
16
16
  "@types/node": "^25.0.3",
17
17
  "rxjs": "^7.8.2",
18
18
  "typescript": "^5.9.3"