hope you are all good.
I have button onclick that call 2 functions BUT it is not working and i dont have any errors displaying in the console, so i don't know where the problem is.
Here is my code
<div className="d-grid gap-2">
<Bouton btnCss = 'btn btn-success my-3'
click= { () => { this.props.handleSubmit; this.setState({begin : true})}}>
Commencer la tâche
</Bouton>
</div>
</form>
</>
)
}
}
export default withFormik({
mapPropsToValues : () => ({
tache : '',
unite : '',
commentaire : ''
}),
validationSchema : Yup.object().shape({
tache : Yup.number()
.required('Choisissez une tâche'),
unite : Yup.number()
.required('Choisissez une unite'),
commentaire : Yup.string()
.min(5, 'Le Texte est trop court')
.required('Veuillez entre un texte')
}),
handleSubmit : (values, {props, resetForm}) => {
resetForm();
props.validation(values.tache, values.unite, values.commentaire);
}
})
(taskForm)
Thank you for your help mates !
onClickbut notclick.