| | |
| | | } |
| | | }) |
| | | _tabs.subtabs = config.subtabs.filter(tab => { |
| | | if (tab.controlVal === val) { |
| | | return false |
| | | } else if (/,/ig.test(tab.controlVal)) { |
| | | return !tab.controlVal.split(',').includes(val) |
| | | } |
| | | return true |
| | | if (tab.$pass) return true |
| | | |
| | | return !tab.controlVals.includes(val) |
| | | }) |
| | | } else { |
| | | _tabs.subtabs = config.subtabs.filter(tab => { |
| | | if (tab.$pass) return true |
| | | |
| | | return tab.controlVals.includes('@pass_empty@') |
| | | }) |
| | | } |
| | | } |
| | |
| | | if (tabs.setting.supModule === MenuID) { |
| | | if (!data) { |
| | | this.setState({ |
| | | tabs: {...tabs, subtabs: []} |
| | | tabs: {...tabs, subtabs: this.props.config.subtabs.filter(tab => { |
| | | if (tab.$pass) return true |
| | | |
| | | return tab.controlVals.includes('@pass_empty@') |
| | | })} |
| | | }) |
| | | } else { |
| | | let val = '' |
| | |
| | | }) |
| | | this.setState({ |
| | | tabs: {...tabs, subtabs: this.props.config.subtabs.filter(tab => { |
| | | if (tab.controlVal === val) { |
| | | return false |
| | | } else if (/,/ig.test(tab.controlVal)) { |
| | | return !tab.controlVal.split(',').includes(val) |
| | | } |
| | | return true |
| | | if (tab.$pass) return true |
| | | |
| | | return !tab.controlVals.includes(val) |
| | | })} |
| | | }) |
| | | } |