Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import PropTypes from 'prop-types';
import React from 'react';
import ReactSelect, {Async, Creatable, AsyncCreatable} from 'react-select';
import styled, {css} from 'react-emotion';
import convertFromSelect2Choices from 'app/utils/convertFromSelect2Choices';
/**
* The library has `value` defined as `PropTypes.object`, but this
* is not the case when `multiple` is true :/
*/
ReactSelect.Value.propTypes = {
...ReactSelect.Value.propTypes,
value: PropTypes.any,
};
export default class SelectControl extends React.Component {
static propTypes = {
...ReactSelect.propTypes,
options: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.node,
value: PropTypes.any,
})
),
// react-select knows this as multi, but for standardization
// and compatibility we use multiple
multiple: PropTypes.bool,
// multi is supported for compatibility
import PropTypes from 'prop-types';
import React from 'react';
import ReactSelect, {Async, Creatable, AsyncCreatable} from 'react-select';
import styled, {css} from 'react-emotion';
import convertFromSelect2Choices from 'app/utils/convertFromSelect2Choices';
/**
* The library has `value` defined as `PropTypes.object`, but this
* is not the case when `multiple` is true :/
*/
ReactSelect.Value.propTypes = {
...ReactSelect.Value.propTypes,
value: PropTypes.any,
};
export default class SelectControl extends React.Component {
static propTypes = {
...ReactSelect.propTypes,
options: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.node,
value: PropTypes.any,
})
),
// react-select knows this as multi, but for standardization
// and compatibility we use multiple
multiple: PropTypes.bool,