Skip to content
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

FormBuilder onChange stops triggering after 4 calls #122

Closed
Drizin opened this issue Aug 14, 2018 · 4 comments
Closed

FormBuilder onChange stops triggering after 4 calls #122

Drizin opened this issue Aug 14, 2018 · 4 comments

Comments

@Drizin
Copy link

Drizin commented Aug 14, 2018

Created an empty project using create-react-app, and added FormBuilder with a simple console.log event for schema changes. After 4 changes, the event stops triggering.
Sample code:

import React, { Component } from 'react';
import {FormBuilder} from 'react-formio';

class App extends Component {
  render() {
    return (
      <div className="App">
        <FormBuilder 
			form={{ display: 'form' }} 
			onChange={(schema) => console.log(schema)} />
      </div>
    );
  }
}

export default App;

@kyawkyawsoezhu
Copy link

I have the same issue

@abhisheksdm
Copy link

i have the same issue also

@abhisheksdm
Copy link

hello @kyawkyawsoezhu and @Drizin , i have done R&D and found & fixed this issue by passing options={readOnly: true}, and now the form builder onchange works fine.
Here is my example code<FormBuilder
form={this.state.data}
options={{ readOnly: true }}
onChange={this.onChangeFormBuilder}
/>
in form you can pass your predefined form if you have otherwise pass form ={{display: 'form'}}

@TanyaGashtold
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants