| | |
| | | if (key === 'datatype') { |
| | | this.setState({ |
| | | datatype: val, |
| | | formlist: formlist.map(item => { |
| | | formlist: fromJS(formlist).toJS().map(item => { |
| | | if (['Yaxis'].includes(item.key)) { |
| | | item.hidden = val === 'statistics' |
| | | } else if (['InfoType', 'InfoValue'].includes(item.key)) { |
| | |
| | | return item |
| | | }) |
| | | }) |
| | | } else if (key === 'label') { |
| | | this.setState({formlist: fromJS(formlist).toJS().map(cell => { |
| | | if (!['labelColor', 'labelValue'].includes(cell.key)) return cell |
| | | |
| | | if (cell.key === 'labelColor') { |
| | | if (val !== 'true') { |
| | | cell.hidden = true |
| | | } else { |
| | | cell.hidden = false |
| | | } |
| | | } else { |
| | | if (val === 'false') { |
| | | cell.hidden = true |
| | | } else { |
| | | cell.hidden = false |
| | | } |
| | | } |
| | | |
| | | return cell |
| | | })}) |
| | | } |
| | | } |
| | | |