title: Change React-Select Options Based on Input
body: <p>I'm using React-Select to give users the ability to multi-select different options. The only problem, is that I have a list of 3k entries, and I'd like to limit the initial options list to only 10 results UNTIL they start typing in characters. React-Select already evaluates the string input and returns matching elements based on the input string, but I'd like to conduct the search on the FULL options list, and change the options dropdown/results based on the matching returns.</p>
  <p>Ex:</p>
  <pre><code>const optionsList1 = [
          { label: 'Option 1', value: 'Option 1'},
          { label: 'Option 2', value: 'Option 2'},
          { label: 'Option 3', value: 'Option 3'},
          { label: 'Option 4', value: 'Option 4'},
      ];
  
  const optionsList2 = [
          { label: 'Option 1', value: 'Option 1'},
          { label: 'Option 2', value: 'Option 2'},
          { label: 'Option 3', value: 'Option 3'},
          { label: 'Option 4', value: 'Option 4'},
          { label: 'Option Test1', value: 'Option Test1'},
          { label: 'Option Test2', value: 'Option Test2'},
          { label: 'Option 7', value: 'Option 7'},
          { label: 'Option 8', value: 'Option 8'},
      ];
  </code></pre>
  <p>For instance, right now here is my React-Select Markup:</p>
  <pre><code>&lt;CreatableSelect
     isMulti
     onChange={this.handleSelectionChange}
     options={optionsList1}
     name=&quot;selectedItems&quot;
     styles={customStyles}
     value={this.state.selectedItems}
     placeholder=&quot;* Selection Items&quot;
  /&gt;
  </code></pre>
  <p>Currently, when someone searches for the string, &quot;Option 4&quot;, it would return Option 4 from optionsList1, (which is correct), but instead I'd like it to search optionsList2, and then UPDATE the optionsList1 with the returned values that are a match. I cannot just change the optionsList1, because then it would add 3k results to the list and the performance is slow.</p>
  <p>So what I'd like to happen is someone types in an input for a search like, &quot;Option Test&quot; and then it would check optionsList2, find that there are two results with &quot;Option Test&quot; in the matching string, and then optionsList1 would be dynamically updated to be:</p>
  <pre><code>optionsList1 = [
              { label: 'Option Test1', value: 'Option Test1'},
              { label: 'Option Test2', value: 'Option Test2'},
          ];
  </code></pre>
  <p>And then users can select the option from those returned values if it's a match.</p>
  <p>EDIT: The onChange function is just setting the state for the selected items. Doesn't have anything to do with the search query.</p>