react-native-gifted-form icon indicating copy to clipboard operation
react-native-gifted-form copied to clipboard

GiftedForm: SubmitWidget

Open pheakdeyyi opened this issue 8 years ago • 1 comments

Everything works great as I have it right now. I have a textfield, a googleplace, date selector, and radio slection inside the form. At the bottom, I added the submitWidget, the onSubmit works, I am able to see the eventTitle and eventDate populated but the button itself has a loading bar. How can I stop it?

I'm going to just pass my 4 data elements in State to another component.

GiftedForm.SubmitWidget title="Create" widgetStyles={{ submitButton: { backgroundColor: '#1faadb', }, }} onSubmit={(isValid, values, validationResults, postSubmit = null, modalNavigator = null) => { if (isValid === true) { this.setState({ eventTitle: values.eventTitle }); this.setState({ eventDate: moment(values.eventDate).format('MM-DD-YYYY') }); } }} />

pheakdeyyi avatar Jul 21 '17 22:07 pheakdeyyi

@pheakdeyyi use postSubmit(); to stop it after you have saved or posted your data. Or use postSubmit(['An error occurred, please try again']); if you found an error in the process

eliasturbay avatar Oct 16 '17 19:10 eliasturbay