Browse Source

修复了由于将列选择器更换为displayColumnBox后数据结构变化导致排序列没有正常获取到数据的bug

xiaoct 7 years ago
parent
commit
0c09a87ef6

+ 1 - 1
src/components/chartDesigner/sections/dataViewConfigForm.jsx

@@ -48,7 +48,7 @@ class DataViewConfigForm extends React.Component {
 						}}
 					>
 						{chartDesigner.dataViewConfig.viewColumns.map((c, i)=>{
-							return <Option key={i} value={c.name}>{c.label}</Option>
+							return <Option key={i} name={c.name}>{c.label}</Option>
 						})}
 					</Select>
 				</FormItem>

+ 1 - 1
src/components/chartDesigner/sections/displayColumnBox.jsx

@@ -57,7 +57,7 @@ class DisplayColumnBox extends React.Component {
         let viewColumns = targetColumns.map(c => {
             let cl = chartDesigner.columns.find(_c => _c.name === c);
             return {
-                key: cl.name,
+                name: cl.name,
                 label: cl.label
             }
         });