@reactables/react-forms 0.4.6-alpha.0 → 0.5.1-alpha.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.
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { AbstractControlConfig, ControlRef, ControlModels } from '@reactables/forms';
3
3
  export interface FormArrayChildrenProps {
4
4
  items: ControlModels.FormControl<unknown>[];
5
- addControl: (config: AbstractControlConfig) => void;
5
+ pushControl: (config: AbstractControlConfig) => void;
6
6
  removeControl: (controlRef: ControlRef) => void;
7
7
  }
8
8
  export interface FormArrayProps {
package/dist/index.js CHANGED
@@ -97,13 +97,13 @@ var Field = function (_a) {
97
97
 
98
98
  var FormArray = function (_a) {
99
99
  var _b = _a.name, name = _b === void 0 ? 'root' : _b, children = _a.children;
100
- var _c = React.useContext(FormContext), state = _c.state, _d = _c.actions, addControl = _d.addControl, removeControl = _d.removeControl;
100
+ var _c = React.useContext(FormContext), state = _c.state, _d = _c.actions, pushControl = _d.pushControl, removeControl = _d.removeControl;
101
101
  var controlRef = state[name].controlRef;
102
102
  var items = forms.getArrayItems(controlRef, state);
103
103
  var formArrayChildrenProps = {
104
104
  items: items,
105
- addControl: function (config) {
106
- addControl({ controlRef: controlRef, config: config });
105
+ pushControl: function (config) {
106
+ pushControl({ controlRef: controlRef, config: config });
107
107
  },
108
108
  removeControl: removeControl
109
109
  };
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "license": "ISC",
18
18
  "dependencies": {
19
19
  "@reactables/core": "*",
20
- "@reactables/forms": "^0.4.6-alpha.0",
20
+ "@reactables/forms": "^0.5.1-alpha.0",
21
21
  "@reactables/react-helpers": "*"
22
22
  },
23
23
  "peerDependencies": {
@@ -25,5 +25,5 @@
25
25
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
26
26
  "rxjs": "^6.0.0 || ^7.0.0"
27
27
  },
28
- "version": "0.4.6-alpha.0"
28
+ "version": "0.5.1-alpha.0"
29
29
  }