SHARE
TWEET

Untitled

a guest Sep 17th, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* import package here */
  2. import ...
  3.  
  4. /* query static data here */
  5. const SEARCH_QUERY = graphql`
  6. ...
  7. `
  8.  
  9. class Search extends Component {
  10.   state = {
  11.  
  12.   };
  13.  
  14.   async componentDidMount() {
  15.  
  16.   }
  17.  
  18.   rebuildIndex = () => {
  19.    
  20.   };
  21.  
  22.   onSearch = e => {
  23.    
  24.   };
  25.  
  26.   onChange = e => {
  27.  
  28.   };
  29.  
  30.   render() {
  31.     const option = ...;
  32.  
  33.     return (
  34.       <div style={{ margin: '0 auto' }}>
  35.         <Select
  36.           showSearch
  37.           showArrow={false}
  38.           id="Search"
  39.           notFoundContent={null}
  40.           value={searchQuery}
  41.           filterOption={false}
  42.           onChange={this.onChange}
  43.           onSearch={this.onSearch}
  44.           placeholder="Search"
  45.           style={{ margin: '0 auto', width: '400px' }}>
  46.           {option}
  47.         </Select>
  48.       </div>
  49.     );
  50.   }
  51. }
  52.  
  53. export default () => (
  54.   <StaticQuery
  55.     query={SEARCH_QUERY}
  56.     render={seedData => {
  57.       return <Search seedData={seedData} />;
  58.     }}
  59.   />
  60. );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top