diff --git a/packages/canyon-platform/src/components/CanyonReport/ListTable.tsx b/packages/canyon-platform/src/components/CanyonReport/ListTable.tsx index a41d31b2..a91dd193 100644 --- a/packages/canyon-platform/src/components/CanyonReport/ListTable.tsx +++ b/packages/canyon-platform/src/components/CanyonReport/ListTable.tsx @@ -92,17 +92,23 @@ const CanyonReportListTable = ({ dataSource, loading, keywords, onSelect, onlyCh title: t('common.total'), key: 'total', dataIndex: ['statements', 'total'], + sorter(a, b) { + return a.statements.total - b.statements.total; + }, }, { title: t('common.covered'), key: 'covered', dataIndex: ['statements', 'covered'], + sorter(a, b) { + return a.statements.covered - b.statements.covered; + }, }, ] .concat(newlinesColumns) .concat([ { - title: t('projects.config.coverage')+ ' %', + title: t('projects.config.coverage') + ' %', width: '300px', key: 'c', sorter: (a, b) => { diff --git a/packages/canyon-platform/src/components/CanyonReport/TreeTable.tsx b/packages/canyon-platform/src/components/CanyonReport/TreeTable.tsx index 2b2c5d9b..1e87b50e 100644 --- a/packages/canyon-platform/src/components/CanyonReport/TreeTable.tsx +++ b/packages/canyon-platform/src/components/CanyonReport/TreeTable.tsx @@ -89,17 +89,23 @@ const CanyonReportTreeTable = ({ dataSource, loading, activatedPath, onSelect, o title: t('common.total'), key: 'total', dataIndex: ['summary', 'statements', 'total'], + sorter(a, b) { + return a.summary.statements.total - b.summary.statements.total; + }, }, { title: t('common.covered'), key: 'covered', dataIndex: ['summary', 'statements', 'covered'], + sorter(a, b) { + return a.summary.statements.covered - b.summary.statements.covered; + }, }, ] .concat(newlinesColumns) .concat([ { - title: t('projects.config.coverage')+ ' %', + title: t('projects.config.coverage') + ' %', width: '300px', key: 'c', dataIndex: ['summary', 'statements', 'pct'],