Unverified Commit 639f7eaf authored by Lijiaoa's avatar Lijiaoa Committed by GitHub
Browse files

draw intermeidate number keys when intermediate is dict (#2137)


Co-authored-by: default avatarLijiao <15910218274@163.com>
parent 437c2049
......@@ -241,9 +241,15 @@ class TableList extends React.Component<TableListProps, TableListState> {
// final result in a succeed trial, it may be a dict.
// get intermediate result dict keys array
const { intermediateKey } = this.state;
let otherkeys: string[] = ['default'];
const otherkeys: string[] = [ ];
if (res.data.length !== 0) {
otherkeys = Object.keys(parseMetrics(res.data[0].data));
// just add type=number keys
const intermediateMetrics = parseMetrics(res.data[0].data);
for(const key in intermediateMetrics){
if(typeof intermediateMetrics[key] === 'number') {
otherkeys.push(key);
}
}
}
// intermediateArr just store default val
Object.keys(res.data).map(item => {
......
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