How to use the react-select.default function in react-select

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 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 = () => {};

export const ChevronIcon: React.SFC = props => ;
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 seeden / react-form-controlled / src / SelectPro.jsx View on Github external
getReactSelect() {
    const creator = require('react-select');
    return creator.default ? creator.default : creator;
  }
github brave / ethereum-remote-client / ui / app / pages / create-account / connect-hardware / account-list.js View on Github external
const { Component } = require('react')
const PropTypes = require('prop-types')
const h = require('react-hyperscript')
const genAccountLink = require('../../../../lib/account-link.js')
const Select = require('react-select').default
import Button from '../../../components/ui/button'

class AccountList extends Component {
  getHdPaths () {
    return [
      {
        label: `Ledger Live`,
        value: `m/44'/60'/0'/0/0`,
      },
      {
        label: `Legacy (MEW / MyCrypto)`,
        value: `m/44'/60'/0'`,
      },
    ]
  }
github jimf / combine / src / components / Search.js View on Github external
const { createElement } = require('react')
const DOM = require('react-dom-factories')
const Select = require('react-select').default
const PropTypes = require('prop-types')
const { div } = DOM

const Search = ({
  items,
  left,
  top,
  onSearch,
  searchValue,
  width
}) =>
  div({ className: 'search box', style: { left, top, width } },
    createElement(Select, {
      autoFocus: true,
      onChange: (option) => option && onSearch(option.value),
      filterOptions: (options, filterValue, excludeOptions, props) => {
github seeden / react-form-controlled / dist / SelectPro.js View on Github external
value: function getReactSelect() {
      var creator = require('react-select');
      return creator.default ? creator.default : creator;
    }
  }, {
github laurent22 / joplin / ElectronClient / app / gui / PromptDialog.jsx View on Github external
const React = require('react');
const { _ } = require('lib/locale.js');
const { themeStyle } = require('../theme.js');
const { time } = require('lib/time-utils.js');
const Datetime = require('react-datetime');
const CreatableSelect = require('react-select/lib/Creatable').default;
const Select = require('react-select').default;
const makeAnimated = require('react-select/lib/animated').default;

class PromptDialog extends React.Component {
	constructor() {
		super();

		this.answerInput_ = React.createRef();
	}

	componentWillMount() {
		this.setState({
			visible: false,
			answer: this.props.defaultValue ? this.props.defaultValue : '',
		});
		this.focusInput_ = true;
	}