import PropTypes from 'prop-types'; import React from 'react'; import Async from './Async'; import Creatable from './Creatable'; import Select from './Select'; class AsyncCreatableSelect extends React.Component { focus () { this.select.focus(); } render () { return ( {({ ref, ...asyncProps }) => { const asyncRef = ref; return ( {({ ref, ...creatableProps }) => { const creatableRef = ref; return this.props.children({ ...creatableProps, ref: (select) => { creatableRef(select); asyncRef(select); this.select = select; } }); }} ); }} ); } } const defaultChildren = props =>