hunk.code_window:   inputValue: string,
   };
   const filterColors = (inputValue: string) => {
     if (inputValue) {
       return colourOptions.filter(i =>
           i.label.toLowerCase().includes(inputValue.toLowerCase())
         );
     }
     return colourOptions;
   };
   const loadOptions = (inputValue, callback) => {
  
hunk.labels: keep keep keep keep replace replace replace replace replace replace keep keep keep
hunk.after_edit:   return colourOptions.filter(i =>
       i.label.toLowerCase().includes(inputValue.toLowerCase())
     );
  
hunk.file_path: docs/examples/AsyncCallbacks.js
hunk.type: replace
file: import React, { Component } from 'react';
  
  import AsyncCreatableSelect from '../../src/AsyncCreatable';
  import { colourOptions } from '../data';
  
  const filterColors = (inputValue: string) => {
    if (inputValue) {
      return colourOptions.filter(i =>
          i.label.toLowerCase().includes(inputValue.toLowerCase())
        );
    }
    return colourOptions;
  };
  
  const promiseOptions = inputValue =>
    new Promise(resolve => {
      setTimeout(() => {
        resolve(filterColors(inputValue));
      }, 1000);
    });
  
  export default class WithPromises extends Component<*, State> {
    render() {
      return (
        <AsyncCreatableSelect
          cacheOptions
          defaultOptions
          loadOptions={promiseOptions}
        />
      );
    }
  }
  