André Bassi
André Bassi
it return empty in input field ;/
im getting the initial values from: await fetch(base_url + '/select') .then((response) => { return response.json(); }) .then((row) => { and after set: this.setState({formData:data}) Fired in: componentWillMount(){ this.fetchData().done(); }
How could I set an initial value from an api before render of component? P.S: I really enjoyed using your project, but only missing a set information, fetching from a...
@mbeech Thank you for your help!
@mbeech -> And how could this work before render() to load the information before View rendering? Your suggestion works perfectly when a button is pressed.
@FaridSafi -> It is possible to fetch a rest api and a populate a form? defaults={{ username: api.name, }} ... ?