/** * External dependencies */ import React from 'react'; import classNames from 'classnames'; /** * Select component. */ export default class Select extends React.Component { /** * Share UI actions need to be performed manually for elements. * They should be done in this method. */ componentDidMount() { this.$el = jQuery( this.el ); this.$el.SUIselect2( { minimumResultsForSearch: -1 } ); this.$el.on( 'change', this.props.onChange ); } /** * Render component. * * @return {JSX.Element} Select component. */ render() { const selectOptions = this.props.items.map( ( item, id ) => { return ( ); } ); const width = 'undefined' === typeof this.props.classes ? '250' : null; return (