瀏覽代碼

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

zhuth 7 年之前
父節點
當前提交
906037ca42
共有 1 個文件被更改,包括 2 次插入2 次删除
  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
             }
         });