Selectable dropdown list

This commit is contained in:
John Lyon-Smith
2018-03-26 10:29:35 -07:00
parent 90a920264b
commit bc051e3551
5 changed files with 79 additions and 39 deletions

View File

@@ -112,6 +112,16 @@ export class UserForm extends React.Component {
render() {
const { binder } = this.state
const teams = [
{ id: 1, name: 'Sign of the Times' },
{ id: 2, name: 'Trash Monsters' },
{ id: 3, name: 'The Bigger Picker Uppers' },
{ id: 4, name: 'Carcass Masters' },
{ id: 5, name: 'Dust Bunnies' },
{ id: 6, name: 'Pavement Busters' },
{ id: 7, name: 'Don\'t Hug That Tree' },
{ id: 8, name: 'Broken Swingers' },
]
return (
<form style={{ width: '100%', height: '100%', overflow: 'scroll' }} id='userForm' onSubmit={this.handleSubmit}>
@@ -145,9 +155,9 @@ export class UserForm extends React.Component {
</Row>
</Column.Item>
<Column.Item>
<DropdownList render={(item) => (
<DropdownList.Item style={{ paddingLeft: 8 }}>
<DropdownList.Text>Team Name</DropdownList.Text>
<DropdownList items={teams} render={(item) => (
<DropdownList.Item key={item.id} style={{ paddingLeft: 8 }}>
<DropdownList.Text>{item.name}</DropdownList.Text>
</DropdownList.Item>
)} />
</Column.Item>