@sheinx/base 3.6.0-beta.17 → 3.6.0-beta.18

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.
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["form.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,IAAI,wFA0HT,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["form.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,IAAI,wFA2HT,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/cjs/form/form.js CHANGED
@@ -39,12 +39,14 @@ var Form = function Form(props) {
39
39
  beforeChange: undefined,
40
40
  reserveAble: false
41
41
  };
42
+ var formElRef = (0, _react.useRef)(null);
42
43
  var _useInputAble = (0, _hooks.useInputAble)(inputAbleParams),
43
44
  value = _useInputAble.value,
44
45
  onChange = _useInputAble.onChange;
45
46
  var _useForm = (0, _hooks.useForm)(_objectSpread(_objectSpread({}, rest), {}, {
46
47
  value: value,
47
- onChange: onChange
48
+ onChange: onChange,
49
+ formElRef: formElRef
48
50
  })),
49
51
  Provider = _useForm.Provider,
50
52
  ProviderProps = _useForm.ProviderProps,
@@ -118,7 +120,6 @@ var Form = function Form(props) {
118
120
  className: rootClass,
119
121
  style: style
120
122
  });
121
- var formElRef = (0, _react.useRef)(null);
122
123
  (0, _react.useEffect)(function () {
123
124
  if (formElRef.current instanceof HTMLFormElement) {
124
125
  formElRef.current.addEventListener('submit', formProps.onSubmit);
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["form.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,IAAI,wFA0HT,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["form.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,IAAI,wFA2HT,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/esm/form/form.js CHANGED
@@ -30,12 +30,14 @@ var Form = function Form(props) {
30
30
  beforeChange: undefined,
31
31
  reserveAble: false
32
32
  };
33
+ var formElRef = useRef(null);
33
34
  var _useInputAble = useInputAble(inputAbleParams),
34
35
  value = _useInputAble.value,
35
36
  onChange = _useInputAble.onChange;
36
37
  var _useForm = useForm(_objectSpread(_objectSpread({}, rest), {}, {
37
38
  value: value,
38
- onChange: onChange
39
+ onChange: onChange,
40
+ formElRef: formElRef
39
41
  })),
40
42
  Provider = _useForm.Provider,
41
43
  ProviderProps = _useForm.ProviderProps,
@@ -109,7 +111,6 @@ var Form = function Form(props) {
109
111
  className: rootClass,
110
112
  style: style
111
113
  });
112
- var formElRef = useRef(null);
113
114
  useEffect(function () {
114
115
  if (formElRef.current instanceof HTMLFormElement) {
115
116
  formElRef.current.addEventListener('submit', formProps.onSubmit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.6.0-beta.17",
3
+ "version": "3.6.0-beta.18",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.6.0-beta.17",
13
+ "@sheinx/hooks": "3.6.0-beta.18",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"