Skip to content

Instantly share code, notes, and snippets.

@drwelby
Created February 9, 2017 17:50
Show Gist options
  • Save drwelby/68f6d6a90d795fa773faa6b70f316c1b to your computer and use it in GitHub Desktop.
Save drwelby/68f6d6a90d795fa773faa6b70f316c1b to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import './App.css';
import 'onsenui/css/onsenui.css';
import 'onsenui/css/onsen-css-components.css';
import 'react-select/dist/react-select.css';
import { Page } from 'react-onsenui';
import Select from 'react-select';
class App extends Component {
logChange = (val) => {
alert("Selected");
}
render() {
var options = [
{ value: 'one', label: 'One' },
{ value: 'two', label: 'Two' }
];
return (
<div className="App">
<Page>
<form className='search'>
<Select name='form-field-one'
placeholder={'Search'}
onChange={this.logChange}
value="one"
options={options}/>
</form>
</Page>
</div>
);
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment