Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit f8c30a5

Browse files
authored
Merge pull request #82 from CMTegner/issue-81-fix-custom-menu-example-selection-logic
Correctly filter items when selecting a state, fixes #81
2 parents 4ce47c5 + e796f9b commit f8c30a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/custom-menu/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let App = React.createClass({
2828
inputProps={{name: "US state", id: "states-autocomplete"}}
2929
items={this.state.unitedStates}
3030
getItemValue={(item) => item.name}
31-
onSelect={value => this.setState({ value, unitedStates: [] }) }
31+
onSelect={(value, state) => this.setState({ value, unitedStates: [state] }) }
3232
onChange={(event, value) => {
3333
this.setState({ value, loading: true })
3434
fakeRequest(value, (items) => {

0 commit comments

Comments
 (0)