title: OnRowSelect Set State in JS React - Allowing Filtered Route Selection
body: <p>I am attempting to pass an argument, setting 'fooId' to a temporary state, allowing to me set the default filter for the user to all 'fooId's within a react-data-grid when they clicked on the row(a cell value used for filtering). I thought I could make a function to set the state and pass that through the filter. The backend and supporting Sagas, Reducer, ect are built to support passing data. I just need to figure out this change in default filtering to set the filter to slice 'filteredData'. Hope it makes sense...Please see applicable code below, thanks:</p>
  
  <pre><code>function FooBar({fooBar, filteredData, fooBarSearch, toDate, fromDate, searchText, foobar}) {
  
  let filterData = fooBar.slice();
  function onRowClickFoo(event) { let fooBarId = set.state.fooId return 
  selectRoute('bar/whee/' + fooId); }
  
  return (
  
  &lt;div&gt;
      &lt;Grid fluid&gt;
          &lt;Row className={styles.fooPage}&gt;
              &lt;Col xs={12} md={3}&gt;
                  &lt;AutoComplete
                      floatingLabelText="Search Foo"
                      filter={AutoComplete.caseInsensitiveFilter}
                      openOnFocus={true}
                      dataSource={foobar}
                      searchText={searchText}
                      dataSourceConfig={{text: 'fooId', value: 'fooId'}}
                      onUpdateInput={searchOnUpdateHandler}
                      onNewRequest={searchOnNewRequest}
                      maxSearchResults={8}
                  /&gt;
              &lt;/Col&gt;
              &lt;Col xs={12} md={3}&gt;
                  &lt;DatePicker
                      onChange={fromDateOnChangeHandler}
                      floatingLabelText="Filter Start Date"
                      autoOk={true}
                      value={fromDate}
                      mode="landscape"
                      firstDayOfWeek={0}
                      shouldDisableDate={disableStartDays}
                  /&gt;
              &lt;/Col&gt;
              &lt;Col xs={12} md={3}&gt;
                  &lt;DatePicker
                      onChange={toDateOnChangeHandler}
                      floatingLabelText="Filter End Date"
                      autoOk={true}
                      value={toDate}
                      mode="landscape"
                      firstDayOfWeek={0}
                      shouldDisableDate={disableEndDays}
                  /&gt;
              &lt;/Col&gt;
              &lt;Col xs={12} md={3} className={styles.resetButton}&gt;
                  &lt;RaisedButton
                      label="Reset"
                      secondary={true}
                      onTouchTap={handleResetFilter}
                  /&gt;
              &lt;/Col&gt;
          &lt;/Row&gt;
          &lt;Row&gt;
              &lt;Col xs={12}&gt;
                  &lt;fooBarGrid className={styles.fooBarGrid}
                                 columnHeaders={columnHeaders}
                                 rows={filteredData}
                                 enableRowSelect={true}
                                 onRowSelect={onRowClickFoo}
                  /&gt;
  </code></pre>