Skip to content

Instantly share code, notes, and snippets.

@kettanaito
Created October 26, 2018 11:25
Show Gist options
  • Save kettanaito/93a84ee988042a63875b9f7dcb0f2380 to your computer and use it in GitHub Desktop.
Save kettanaito/93a84ee988042a63875b9f7dcb0f2380 to your computer and use it in GitHub Desktop.
handlePeopleInFlatChange = ({ nextValue }) => {
this.setState({ peopleInFlat: nextValue })
}
render() {
const { peopleInFlat } = this.state
return (
<Dropdown
getDropdownValue={this.getDropdownValue}
label="Ilu będzie lokatorów?"
name="peopleInFlat"
placeholder="People in Flat"
required
tooltip="Określienie liczby mieszkańców jest niezbędne do przygotowania przez nas prognoz zużycia prądu na najbliższe miesiące (średnie zużycie prądu na osobę to 183 kWh)."
initialValue={peopleInFlat}
values={peopleInFlatDropdown}
onChange={this.handlePeopleInFlatChange}
/>
<Input
value={peopleInFlat}
disabled
/>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment