Browse Source

图表过滤规则为错误条件时不允许启用

zhuth 7 years ago
parent
commit
906037ca42
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/components/chartDesigner/sections/toolbar.jsx

+ 2 - 2
src/components/chartDesigner/sections/toolbar.jsx

@@ -20,7 +20,7 @@ class Toolbar extends React.Component {
         const filters = chartDesigner.filters;
         dispatch({ type: 'chartDesigner/changeField', name: 'filters', value: filters.map( f => {
             if(+f.key === +key) {
-                f = { ...f, using: !f.using }
+                f = { ...f, using: f.type ? !f.using : false}
             }
             return f;
         }), autoRefresh });
@@ -96,7 +96,7 @@ class Toolbar extends React.Component {
             return {
                 key: f.key,
                 label: this.createFilterLabel(f),
-                using: f.using
+                using: f.type ? f.using : false
             }
         });