react-bootstrap-validation icon indicating copy to clipboard operation
react-bootstrap-validation copied to clipboard

How to clear all fields?

Open ruslanchek opened this issue 8 years ago • 2 comments

ruslanchek avatar Jun 14 '16 13:06 ruslanchek

When you give your form a reference, you can call refs.form.reset() on that reference.

Example:

class MyComponent extends React.Component {
  resetForm = () => {
    this.refs.form.refs.reset();
  };

  render() {
    return (
      <Form ref="form">{/* Input elements here */}</Form>
   );
  }
}

frostney avatar Jun 21 '16 15:06 frostney

It will refresh values based on model? or not? .. i want to update form values by model attribute but it not works ..its parsed only for one time? There is no way to update form after was loaded by initial model values?

mikethejet avatar Feb 24 '17 10:02 mikethejet