How to use the react-select.defaultProps 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 cozy / cozy.github.io / en / cozy-banks / src / components / SelectDates / SelectDates.spec.jsx View on Github external
/* global mount */

import AppLike from 'test/AppLike'
import React from 'react'
import SelectDates from './SelectDates'

import Select from 'react-select'
Select.defaultProps.menuIsOpen = true

const isButtonActive = node => !node.is('.SelectDates__Button--disabled')

describe('SelectDates', () => {
  beforeEach(() => {})
  const options = [
    { yearMonth: '2017-10' },
    { yearMonth: '2017-11' },
    { yearMonth: '2018-01' },
    { yearMonth: '2018-02' },
    { yearMonth: '2018-04' }
  ]

  const findButtons = root => {
    const prev = root.find('RoundChip.SelectDates__Button--prev')
    const next = root.find('RoundChip.SelectDates__Button--next')
github Grsmto / simplebar / packages / simplebar / demo / index.js View on Github external
function menuRenderer(params) {
    // use default renderer in a hacky way
    const menu = Select.defaultProps.menuRenderer(params);

    return {menu};
}
github cloudflare / cf-ui / packages / cf-component-select / src / Option.js View on Github external
return {
    boxSizing: 'border-box',
    cursor: 'pointer',
    display: 'block',
    padding: '8px 10px',
    opacity: isDisabled ? 0.5 : 1,
    backgroundColor,
    color,
    '& [role="option"]': {
      whiteSpace: 'nowrap',
      overflow: 'hidden',
      textOverflow: 'ellipsis'
    }
  };
}, ReactSelect.defaultProps.optionComponent);

export default Option;
github reportportal / service-ui / app / src / components / inputs / inputTagsSearch / inputTagsSearch.jsx View on Github external
const renderItems = (params) => (
  
    {Select.defaultProps.menuRenderer(params)}
  
);