@app-studio/web 0.8.13 → 0.8.14
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.
- package/dist/components/Formik/Formik.Form.d.ts +1 -1
- package/dist/web.cjs.development.js +8 -3
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +8 -3
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +8 -3
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +2 -3
|
@@ -21,5 +21,5 @@ interface FocusContextType {
|
|
|
21
21
|
setInputRef: (name: string, ref: HTMLInputElement | null) => void;
|
|
22
22
|
}
|
|
23
23
|
export declare const useFormFocus: () => FocusContextType;
|
|
24
|
-
export declare const FormikForm: <T extends {}>({ children, autoFocus, initFocus, ...props }: any) => React.JSX.Element;
|
|
24
|
+
export declare const FormikForm: <T extends {}>({ children, autoFocus, initFocus, onChange, ...props }: any) => React.JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -4850,7 +4850,7 @@ var PasswordComponent = _ref => {
|
|
|
4850
4850
|
*/
|
|
4851
4851
|
var Password = PasswordComponent;
|
|
4852
4852
|
|
|
4853
|
-
var _excluded$z = ["children", "autoFocus", "initFocus"];
|
|
4853
|
+
var _excluded$z = ["children", "autoFocus", "initFocus", "onChange"];
|
|
4854
4854
|
var FocusContext = /*#__PURE__*/React.createContext({
|
|
4855
4855
|
active: false,
|
|
4856
4856
|
focusNextInput: () => {},
|
|
@@ -4863,10 +4863,16 @@ var FormikForm = _ref => {
|
|
|
4863
4863
|
var {
|
|
4864
4864
|
children,
|
|
4865
4865
|
autoFocus = false,
|
|
4866
|
-
initFocus
|
|
4866
|
+
initFocus,
|
|
4867
|
+
onChange
|
|
4867
4868
|
} = _ref,
|
|
4868
4869
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
4869
4870
|
var formik$1 = formik.useFormikContext();
|
|
4871
|
+
React.useEffect(() => {
|
|
4872
|
+
if (onChange) {
|
|
4873
|
+
onChange(formik$1.values);
|
|
4874
|
+
}
|
|
4875
|
+
}, [formik$1.values, onChange]);
|
|
4870
4876
|
var inputRefs = React.useRef({});
|
|
4871
4877
|
var inputNames = React.useRef([]);
|
|
4872
4878
|
var setInputRef = (name, ref) => {
|
|
@@ -4969,7 +4975,6 @@ var useFormikInput = _ref => {
|
|
|
4969
4975
|
};
|
|
4970
4976
|
var handleBlur = () => {
|
|
4971
4977
|
setFieldTouched(name, true);
|
|
4972
|
-
// if(props.onBlur)props.onBlur();
|
|
4973
4978
|
};
|
|
4974
4979
|
var handleKeyPress = e => {
|
|
4975
4980
|
if (e.key === 'Enter') {
|