7

Is it possible to have react-select fall back to the native select on mobile devices?

And actually, why is that not the default behaviour?

zok
  • 4,368
  • 9
  • 38
  • 63

2 Answers2

7

This isn't the responsibility of react-select, though if you need this behavior you can compose your own component to achieve it.

You'll need some sort of isMobile() check -- "Detecting a mobile browser"

const MobileAwareSelect = (props) => isMobile() ? (
  <select>{props.options.map(...)}</select>
) : (
  <ReactSelect {...props} />
);
jossmac
  • 198
  • 2
  • 8
2

blurInputOnSelect:

  • boolean = isTouchCapable()
  • Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices)