@app-studio/web 0.8.13 → 0.8.15

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,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FormikConfig } from 'formik';
3
+ export declare const debounce: (...args: any) => void;
3
4
  interface CustomFormProps<T> extends FormikConfig<T> {
4
5
  autoFocus?: boolean;
5
6
  initFocus?: string;
@@ -21,5 +22,5 @@ interface FocusContextType {
21
22
  setInputRef: (name: string, ref: HTMLInputElement | null) => void;
22
23
  }
23
24
  export declare const useFormFocus: () => FocusContextType;
24
- export declare const FormikForm: <T extends {}>({ children, autoFocus, initFocus, ...props }: any) => React.JSX.Element;
25
+ export declare const FormikForm: <T extends {}>({ children, autoFocus, initFocus, onChange, ...props }: any) => React.JSX.Element;
25
26
  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,14 @@ 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
+ onChange(formik$1.values);
4873
+ }, [formik$1.values]);
4870
4874
  var inputRefs = React.useRef({});
4871
4875
  var inputNames = React.useRef([]);
4872
4876
  var setInputRef = (name, ref) => {
@@ -4969,7 +4973,6 @@ var useFormikInput = _ref => {
4969
4973
  };
4970
4974
  var handleBlur = () => {
4971
4975
  setFieldTouched(name, true);
4972
- // if(props.onBlur)props.onBlur();
4973
4976
  };
4974
4977
  var handleKeyPress = e => {
4975
4978
  if (e.key === 'Enter') {