Commit 4b5add48 authored by Nicolas Frandeboeuf's avatar Nicolas Frandeboeuf Committed by Benjamin Bouvier
Browse files

Do not trigger keyboard display on mobile for selects with multiple values

parent f32113e1
......@@ -15,8 +15,10 @@ const REACT_SELECT_FILTER = createFilter({
});
const FuzzyOrNativeSelect = connect((state, props) => {
let isSmallScreen = get.isSmallScreen(state);
return {
useNativeSelect: get.isSmallScreen(state) && !props.isMulti
useNativeSelect: isSmallScreen && !props.isMulti,
isSearchable: !isSmallScreen && props.isSearchable
};
})(
class Export extends React.Component {
......@@ -121,6 +123,7 @@ const FuzzyOrNativeSelect = connect((state, props) => {
placeholder={placeholder}
value={defaultOption}
isMulti={this.props.isMulti}
isSearchable={this.props.isSearchable}
/>
);
}
......@@ -175,7 +178,8 @@ FuzzyOrNativeSelect.defaultProps = {
backspaceRemovesValue: true,
required: false,
className: '',
isMulti: false
isMulti: false,
isSearchable: true
};
export default FuzzyOrNativeSelect;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment