Skip to content

Commit

Permalink
misc(treemap): fix column sorting when some values are blank (#15959)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark authored Apr 17, 2024
1 parent 5faf961 commit c3c85ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions treemap/app/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,12 @@ class TreemapViewer {
// eslint-disable-next-line max-len
{title: TreemapUtil.strings.tableColumnName, field: 'name', widthGrow: 5, tooltip: makeNameTooltip},
// eslint-disable-next-line max-len
{title: TreemapUtil.strings.resourceBytesLabel, field: 'resourceBytes', headerSortStartingDir: 'desc', tooltip: makeBytesTooltip('resourceBytes'), formatter: cell => {
{title: TreemapUtil.strings.resourceBytesLabel, field: 'resourceBytes', sorter: 'number', headerSortStartingDir: 'desc', tooltip: makeBytesTooltip('resourceBytes'), formatter: cell => {
const value = cell.getValue();
return TreemapUtil.i18n.formatBytesWithBestUnit(value);
}},
// eslint-disable-next-line max-len
{title: TreemapUtil.strings.unusedBytesLabel, field: 'unusedBytes', widthGrow: 1, sorterParams: {alignEmptyValues: 'bottom'}, headerSortStartingDir: 'desc', tooltip: makeBytesTooltip('unusedBytes'), formatter: cell => {
{title: TreemapUtil.strings.unusedBytesLabel, field: 'unusedBytes', sorter: 'number', widthGrow: 1, sorterParams: {alignEmptyValues: 'bottom'}, headerSortStartingDir: 'desc', tooltip: makeBytesTooltip('unusedBytes'), formatter: cell => {
const value = cell.getValue();
if (value === undefined) return '';
return TreemapUtil.i18n.formatBytesWithBestUnit(value);
Expand Down

0 comments on commit c3c85ae

Please sign in to comment.