@fto-consult/expo-ui 1.2.14 → 1.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "1.2.14",
3
+ "version": "1.3.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/auth/Login.js CHANGED
@@ -85,7 +85,7 @@ export default function LoginComponent(props){
85
85
  },1000)
86
86
  }
87
87
  },[withPortal])
88
- const {header,children,initialize,contentTop,data:loginData,canGoToNext,keyboardEvents,onSuccess:onLoginSuccess,canSubmit:canSubmitForm,onStepChange,...loginProps} = defaultObj(getProps({
88
+ const {header,children,initialize,contentTop,data:loginData,canGoToNext,keyboardEvents,onSuccess:onLoginSuccess,mutateData,canSubmit:canSubmitForm,onStepChange,...loginProps} = defaultObj(getProps({
89
89
  ...state,
90
90
  setState,
91
91
  state,
@@ -129,7 +129,7 @@ export default function LoginComponent(props){
129
129
  notifyUser(form.getErrorText());
130
130
  return;
131
131
  }
132
- const args = {data,form,state,step,nextButtonRef,previousButtonRef};
132
+ const args = {...state,data,form,state,step,setState,nextButtonRef,previousButtonRef};
133
133
  if(nextButtonRef.current && nextButtonRef.current.isDisabled()){
134
134
  return;
135
135
  }
@@ -148,6 +148,10 @@ export default function LoginComponent(props){
148
148
  }
149
149
  if(step > 1){
150
150
  if(canSubmit(args)){
151
+ ///pour modifier automatiquement la données à mettre à jour
152
+ if(typeof mutateData =='function'){
153
+ mutateData(data);
154
+ }
151
155
  Preloader.open("vérification ...");
152
156
  return auth.signIn(data).then((a)=>{
153
157
  if(typeof onLoginSuccess =='function' && onLoginSuccess(a)=== false) return;