king
2020-10-21 5423c7caa9723e0b232ea6c5ef4aaf90bd7a3334
src/components/sidemenu/index.jsx
@@ -214,14 +214,22 @@
      this.props.modifyTabview([menu])
      e.preventDefault()
    } else {
      let tabs = JSON.parse(JSON.stringify(this.props.tabviews))
      let tabs = fromJS(this.props.tabviews).toJS()
      tabs = tabs.filter(tab => {
        tab.selected = false
        return tab.MenuID !== menu.MenuID
      })
      menu.selected = true
      tabs.push(menu)
      this.props.modifyTabview(tabs)
      if (this.props.tabviews.length !== tabs.length) {
        this.props.modifyTabview(fromJS(tabs).toJS())
      }
      this.setState({}, () => {
        menu.selected = true
        tabs.push(menu)
        this.props.modifyTabview(tabs)
      })
      e.preventDefault()
    }
  }