Commit 8ef2a05a authored by Lijiao's avatar Lijiao
Browse files

keep removing final val when click other intermeidate keys

parent 31afa426
......@@ -247,7 +247,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
}
// intermediateArr just store default val
Object.keys(res.data).map(item => {
if(res.data[item].type === 'PERIODICAL'){
if (res.data[item].type === 'PERIODICAL') {
const temp = parseMetrics(res.data[item].data);
if (typeof temp === 'object') {
intermediateArr.push(temp[intermediateKey]);
......@@ -278,11 +278,13 @@ class TableList extends React.Component<TableListProps, TableListState> {
// just watch default key-val
if (isShowDefault === true) {
Object.keys(intermediateData).map(item => {
const temp = parseMetrics(intermediateData[item].data);
if (typeof temp === 'object') {
intermediateArr.push(temp[value]);
} else {
intermediateArr.push(temp);
if (intermediateData[item].type === 'PERIODICAL') {
const temp = parseMetrics(intermediateData[item].data);
if (typeof temp === 'object') {
intermediateArr.push(temp[value]);
} else {
intermediateArr.push(temp);
}
}
});
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment