Skip to content

Commit

Permalink
fix: when columns is blank and set indicatorsAsCol=false,pivot show t…
Browse files Browse the repository at this point in the history
…otal value #440
  • Loading branch information
fangsmile committed Oct 23, 2023
1 parent f7f5065 commit b8b9f37
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/vtable/src/dataset/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,7 @@ export class Dataset {
this.rows,
indicatorsAsCol ? undefined : indicators,
this.rowsIsTotal,
this?.totals?.row?.showGrandTotals ||
(!indicatorsAsCol && this.columns.length === 0) ||
(indicatorsAsCol && this.rows.length === 0),
this?.totals?.row?.showGrandTotals || (indicatorsAsCol && this.rows.length === 0),
this.rowGrandTotalLabel,
this.rowSubTotalLabel
);
Expand All @@ -245,7 +243,7 @@ export class Dataset {
this.columns,
indicatorsAsCol ? indicators : undefined,
this.colsIsTotal,
this.totals?.column?.showGrandTotals, // || this.rows.length === 0,//todo 这里原有逻辑暂时注释掉
this.totals?.column?.showGrandTotals || (!indicatorsAsCol && this.columns.length === 0), // || this.rows.length === 0,//todo 这里原有逻辑暂时注释掉
this.colGrandTotalLabel,
this.colSubTotalLabel
);
Expand Down

0 comments on commit b8b9f37

Please sign in to comment.