-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from component is not re-rendering from after changing props.form #174
Comments
This should cause the redraw to work: https://github.com/formio/react-formio/blob/master/src/components/Form.js#L108 Is there something we are doing wrong there? |
now I am using a workaround for this problem which little bit affects my code's performance: <Form form={data2} url={this.props.baseURL + this.state.currentUrl} onSubmit={this.formSubmitted} /> } else { return Data Empty} } |
also, I want to put one more thing in your notice that the onSubmit is not emitting the event after hitting at the URL provided in (URL) prop to Form component it emits an event with a value of form data so, I am doing is manual in the above-mentioned code. if you want to reach me you can mail me at [email protected] With Regards Have a good day |
I'm still not sure what is going wrong here. If you'd like to contact [email protected] we can set up a support plan and get you a support call to resolve any issues you are having. |
I have resolved the bug in your code by cloning the source code and making a change in one line( https://github.com/formio/react-formio/blob/master/src/components/Form.js#L108 ) 110: this.formio = formio; fix: 110: this.formio = formio; I have also forked and changed the file |
I am closing the issue as it was created too long ago and there are no new comments here. I hope it was resolved. If not, please reopen it. Thanks! |
Hi, I am using Formio Builder and facing the same issue. |
hey @bhawnasemwal123 thanks for the heads up. I'm going to reopen this issue and make sure I include it in some changes that are coming soon |
@bhawnasemwal123 can you try using the |
I am using Form-component with preloaded form json it is not refreshing the form on changing the value of fromProp of the Form tag
code im using :
class App extends Component {
constructor(props) {
super(props);
this.state = { currentUrl: "5c80b71c6bdc0f69544b4e22/", lastValue: {} }
}
formSubmitted = (value) => {
if (value.nextFormId) {
this.setState({ currentUrl: value.nextFormId })
}
}
componentDidMount() {
fetch(this.props.baseURL + this.state.currentUrl).then(this.handleFormIoResponce)
}
handleFormIoResponce = (responce) => {
responce.json().then(value => {
console.log(value)
this.setState({ lastValue: value })
})
}
render() {
let data = ""
return (
<Form form={this.state.lastValue} url={this.props.baseURL + this.state.currentUrl} onSubmit={this.formSubmitted} />
);
}
}
export default App;
The text was updated successfully, but these errors were encountered: