formsy / formsy-material-ui

A Formsy compatibility wrapper for Material-UI form components
MIT License
571 stars 149 forks source link

Formsy .reset(value) not updating components #132

Open dsmurl opened 8 years ago

dsmurl commented 8 years ago

In my code,

  componentDidMount = () => {
    console.log('Loading Test Data');
    this.myForm.reset({
      task: 'Sample Task',
    });
  };

  render() {
    return (
      <Formsy.Form
        ref={(el) => { this.myForm = el; }}
      >
        <FormsyText
          name="task"
          floatingLabelText="Type to add a new task"
        />
      </Formsy.Form>
    );
  }

The field doesn't visually update, but the _value in the formsy react state is correctly set to "Sample Task". Is this is bug or am I doing it wrong? If I'm doing things correctly then there may be a problem with the reset(value) functionality.

achtan commented 7 years ago

hi, any luck with this one?

dsmurl commented 7 years ago

Ya i pulled formsey out of my project. It fights with the component state and the redux state too much. My form is too complexe for a general library like formsey. Sorry for the no helpy. :/

On Nov 29, 2016 9:20 AM, "David Ďurika" notifications@github.com wrote:

hi, any luck with this one?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mbrookes/formsy-material-ui/issues/132#issuecomment-263599005, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDDL1oHidVTl28XiAxGeovybW3GWFKcks5rDELZgaJpZM4JyM1k .