done minor fixes responive navbar

This commit is contained in:
Nicola Brunner 2020-03-19 11:49:00 +01:00
parent 3360220669
commit c6e483ea6c

View file

@ -8,6 +8,7 @@ class Navbar extends Component {
super(props);
this.state = {
activeItem: 'Home',
activeItemName: 'Home',
edited: "",
editMode : false
}
@ -15,9 +16,10 @@ class Navbar extends Component {
editModeController = (e) => this.setState((prevState) => ({ editMode: !prevState.editMode }));
handleClick = (e, {id}) => {
handleClick = (e, {id, name}) => {
console.log(id);
this.setState({ activeItem: id,
activeItemName: name
});
this.props.handleItemClick(id)
}
@ -104,7 +106,7 @@ class Navbar extends Component {
<Responsive as={Segment} maxWidth={768}>
<Menu inverted>
<Dropdown item fluid text='Select Room'>
<Dropdown item fluid text={this.state.activeItemName}>
<Dropdown.Menu>
<Dropdown.Item