Fix dropdown behavior - network

feature/default_network_editable
sdtsui 7 years ago
parent 34834c108d
commit 4044b58b5a
  1. 12
      ui/app/app.js

@ -198,7 +198,17 @@ App.prototype.renderNetworkDropdown = function () {
return h(Dropdown, {
isOpen,
onClickOutside: (event) => {
this.setState({ isNetworkMenuOpen: !isOpen })
const { classList } = event.target
const isNotToggleElement = [
classList.contains('menu-icon'),
classList.contains('network-name'),
classList.contains('network-indicator'),
].filter(bool => bool).length === 0;
// classes from three constituent nodes of the toggle element
if (isNotToggleElement) {
this.setState({ isNetworkMenuOpen: false })
}
},
zIndex: 11,
style: {

Loading…
Cancel
Save