title: react update screen after changing values in the state
body: <p>I am new to react and I am working on a project where I was ask to reset a form to its defaults. </p>
  
  <p>I created a function that gets call after I click the reset button </p>
  
  <pre><code>&lt;input id="reset_button"
         type="button"
         name="reset"
         value="Reset"
         onClick={this.resetSearch}/&gt;
  </code></pre>
  
  <p>This is my function: </p>
  
  <pre><code>resetSearch: function() {
    this.setState({ID: 'Moo'});
  },
  </code></pre>
  
  <p>I do see the ID change value in the console but it does not update on the screen.</p>
  
  <p>Other things that I have tried </p>
  
  <pre><code>  # when I do this the element despairs from then screen 
    resetSearch: function() {
     var values = this.fields.state.values;
       this.setState({
         defaultValues: {
           values
         },
        ignoreDefault: false
     });
    }
  </code></pre>
  
  <hr>
  
  <pre><code>  #render function
    render: function() {
      return (
        &lt;div className="card-body with-padding-bottom-0"&gt;
          &lt;form id={this.formId}&gt;
            &lt;div id="sn-fields" className="usa-grid-full sn-search"&gt;
              &lt;SNFields ref={(fields) =&gt; { this.fields = fields; }} ddl_id='sn_search_card_type' snOptions={ this.getProp('snOptions')} fields={this.getProp('fields')} updateParentState={this.updateStateByField} defaultFieldValues={this.getProp('defaultValues')} ignoreDefault={this.state.ignoreDefault}&gt;&lt;/SNFields&gt;
            &lt;/div&gt;
  
            &lt;div className="usa-grid-full with-margin-top-10 validation-div"&gt;
              &lt;div id="sn_search_card_search_button_container" className="usa-width-one-whole"&gt;
                &lt;label htmlFor="system_validator"&gt;&lt;/label&gt;
                &lt;input hidden name="system_validator" id="system_validator"/&gt;
                &lt;input id="search_button" type="button" name="search" value="Search" onClick={this.personSearch}/&gt;
                &lt;input id="reset_button" type="button" name="reset" value="Reset" onClick={this.resetSearch}/&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/form&gt;
        &lt;/div&gt;
      );
    }
  </code></pre>
  
  <hr>
  
  <p>I was able to find a class <code>SNFields</code></p>
  
  <pre><code>var SNFields = React.createClass({
  
    filterFields: function(searchVal) {
      console.log('PCQSFields - filterFields ')
      var filterLabels = [];
  
      //filter in this component since the filtering can't be done on the ruby side
      switch(searchVal) {
        case 'APPLICATION_ID':
        case 'ENUMERATOR':
        case 'ENCOUNTER_ID': {
          filterLabels = ['ID'];
          break;
        }
        case 'NAME_AND_DOB': {
          filterLabels = ['Date of Birth', 'Last Name', 'Date Range', 'First Name'];
          break;
        }
        default: {
          break;
        }
      }
  
      var fields = this.props.fields.slice();
      for (var i = fields.length - 1; i &gt; -1; i--) {
        if (filterLabels.indexOf(fields[i].label) &lt; 0) {
          fields.splice(i, 1);
        }
      }
  
      return fields;
    },
  
    render: function() {
      console.log('NSFields - render ')
      return (
        &lt;div&gt;
          &lt;div className="usa-width-one-third"&gt;
            &lt;label htmlFor={this.props.ddl_id} className="card-label bold"&gt;Search Type&lt;/label&gt;
            &lt;Dropdown id={this.props.ddl_id} onChange={this.updateFields} selectableArray={this.props.nsOptions} classes="" selectedOption={this.state.ddl}/&gt;
          &lt;/div&gt;
          &lt;div className="flex-container" style={{'flexWrap': 'row'}}&gt;
            {this.nsFieldsHelper(this.state.fields)}
          &lt;/div&gt;
        &lt;/div&gt;
      );
    }
  
  });
  </code></pre>
  
  <p>I guess what I really want to do is when I press the reset to call</p>
  
  <p><code>SNFields.filterFields('NAME_AND_DOB')</code>
  but when I try that I get a message in the console that reads: <strong>Uncaught TypeError: NSFields.filterFields is not a function</strong></p>