How to use react-select - 10 common examples

To help you get started, we’ve selected a few react-select examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rohan-paul / stock-dashboard-react / src / Components / StockAnalytics / StockAnalyticsDashBoard-WITH-HUGER-autosuggestion.js View on Github external
input: base => ({
        ...base,
        color: theme.palette.text.primary,
        "& input": {
          font: "inherit"
        }
      })
    };

    return (
      
        {console.log("TICKER IS", this.state.stockTicker)}
        <div style="{{">
          <select value="{this.state.stockTicker}" list="">
        

        
          
            
              Selected Stock
            
          
</select></div>
github rohan-paul / stock-dashboard-react / src / Components / StockAnalytics / StockAnalyticsDashBoard.js View on Github external
}
      })
    };

    return (
      
        {console.log("CLOSING PRICE ", this.state.yAxisData_StockClosingPrice)}
        
          
            <div>
              <div>
                <select value="{this.state.stockTicker}" list="">
              
              
                
                    value
                      ? [
                          /\d/,
                          /\d/,
                          "/",</select></div></div>
github studentinsights / studentinsights / app / assets / javascripts / components / SimpleFilterSelect.js View on Github external
// null so that `placeholder` can be used to name what this component can filter when there's
// no value selecting, saving horizontal space.
export default function SimpleFilterSelect(props) {
  const {style, value} = props;
  return (
    <select placeholder="" value="{value" style="{{width:">
  );
}
SimpleFilterSelect.propTypes = {
  ...Select.propTypes,
  value: PropTypes.string.isRequired
};
</select>
github Clever / components / src / Select / Select.jsx View on Github external
if (required) {
    inputNote = <span>required</span>;
  }

  let reactSelectClasses = cssClass.REACT_SELECT;
  if (readOnly) {
    reactSelectClasses += ` ${cssClass.READ_ONLY}`;
  }

  let SelectComponent = ReactSelect;
  if (creatable &amp;&amp; lazy) {
    SelectComponent = ReactSelect.AsyncCreatable;
  } else if (creatable) {
    SelectComponent = ReactSelect.Creatable;
  } else if (lazy) {
    SelectComponent = ReactSelect.Async;
  }

  // The label container must be returned after the ReactSelect otherwise it does not get displayed
  // in the browser.
  return (
    <div>
      <div id="{id}">
        </div></div>
github rohan-paul / stock-dashboard-react / src / Components / StockAnalytics / Alternative-working-codes-kept-for-backup / StockAnalyticsDashBoard-WITH-HUGE-autosuggestion.js View on Github external
font: "inherit"
        }
      })
    };

    return (
      
        
          
            <div>
              <div>
                <select value="{this.state.stockTicker}" list="">
              
              
                
                    value
                      ? [
                          /\d/,
                          /\d/,
                          "/",</select></div></div>
github elifesciences / elife-xpub / packages / component-submission / client / components / SubjectAreaDropdown.js View on Github external
const selectChildProps = {
      components: {
        ClearIndicator: null,
        IndicatorSeparator: null,
        MultiValueRemove: TagRemovalIcon,
      },
      id: 'subject-area-container',
      inputId: 'subject-area-select',
      isMulti: true,
      name,
      onBlur,
      onChange: this.handleChange,
      options: eLifeOptions,
      styles: this.customReactSelectStyles,
      value: selectedOptions,
      filterOption: createFilter({
        matchFrom: 'start',
      }),
    }

    return (
      
        {/* htmlFor matches with react-select's inputId, which applies the correct id to the internal sub-component */}
        {/* eslint-disable-next-line jsx-a11y/label-has-for */}
        <label>
          {label}
          {isOptional &amp;&amp; ' (optional)'}
        </label>
        {!hasReachedMultiselectLimit &amp;&amp; <select>}
        {hasReachedMultiselectLimit &amp;&amp; (
          
            </select>
github man-group / dtale / static / popups / correlations / CorrelationsGrid.jsx View on Github external
correlations: filterData(filterState, correlations),
      });
    };
    return (
      <div>
        <select> _.toLower(o.value))}
          getOptionLabel={_.property("value")}
          getOptionValue={_.property("value")}
          value={this.state[prop]}
          onChange={onChange}
          noOptionsText={() =&gt; "No columns found"}
          isClearable
          filterOption={createFilter({ ignoreAccents: false })} // required for performance reasons!
        /&gt;
      
    );
  }
</select></div>
github meetalva / alva / packages / components / src / select / index.tsx View on Github external
import { Color } from '../colors';
import { Icon, IconName } from '../icons';
import * as React from 'react';
import { getSpace, SpaceSize } from '../space';
import styled from 'styled-components';

const ReactSelect = require('react-select').default;

const StyledChevron = styled(Icon).attrs({ name: IconName.ArrowFillRight })`
	color: ${Color.Black};
	fill: ${Color.Grey60};
	width: 12px;
	height: 12px;
	padding: ${getSpace(SpaceSize.XS) + getSpace(SpaceSize.XXS)}px;
	transform: rotate(90deg);
	transform: rotate(90deg);
`;

// tslint:disable-next-line:no-empty
const NOOP = () =&gt; {};

export const ChevronIcon: React.SFC = props =&gt; ;
github wonderunit / storyboarder / src / js / shot-generator / Select.js View on Github external
const Select = React.memo(({
    value = null,
    label = null,
    options = [],
    disabled = false,
    onSetValue = defaultOnSetValue
  } = {}) => {
  const callbackRef = useRef(onSetValue)
  
  useEffect(() => {
    callbackRef.current = onSetValue
  }, [onSetValue])
  
  return h([ReactSelect.default, {
    options,
    value,
    placeholder: label,
    onChange: callbackRef.current,
    isDisabled: disabled,
    //menuIsOpen: true,// useful to debug
    isSearchable: false,
    menuPlacement: 'auto',
    menuPosition: 'fixed',
    className: 'select',
    classNamePrefix: 'select'
  }])
})
github Opentrons / opentrons / components / src / forms / SelectField.js View on Github external
function DropdownIndicator(props: *) {
  const iconWrapperCx = cx(styles.dropdown_icon_wrapper, {
    [styles.flipped]: props.selectProps.menuIsOpen,
  })

  return (
    components.DropdownIndicator &amp;&amp; (
      
        <div>
          
        </div>
      
    )
  )
}
// custom Menu (options dropdown) component