diff --git a/components/dropdown.js b/components/dropdown.js index 4a4e4e3..6d24a5e 100644 --- a/components/dropdown.js +++ b/components/dropdown.js @@ -6,7 +6,7 @@ class Dropdown extends React.Component { constructor(props) { super() this.state = { - listVisible: false, + isVisible: false, selected: props.selected || props.list[0] } this.select = this.select.bind(this) @@ -18,11 +18,11 @@ class Dropdown extends React.Component { } toggle() { - this.setState({ listVisible: !this.state.listVisible }) + this.setState({ isVisible: !this.state.isVisible }) } handleClickOutside() { - this.setState({ listVisible: false }); + this.setState({ isVisible: false }); } renderListItems() { @@ -62,7 +62,7 @@ class Dropdown extends React.Component { return (