@deephaven/js-plugin-pivot 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +17 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -11043,7 +11043,7 @@ class IrisGridPivotModel extends irisGrid.IrisGridModel {
11043
11043
  return depth;
11044
11044
  }
11045
11045
  textValueForCell(x, y) {
11046
- var _a;
11046
+ var _a, _b;
11047
11047
  if (((_a = this.formattedStringData[x]) == null ? void 0 : _a[y]) === void 0) {
11048
11048
  const value2 = this.valueForCell(x, y);
11049
11049
  if (value2 === null) {
@@ -11053,10 +11053,22 @@ class IrisGridPivotModel extends irisGrid.IrisGridModel {
11053
11053
  return void 0;
11054
11054
  }
11055
11055
  const column = this.columns[x];
11056
+ let columnType = column.type;
11057
+ let columnName = column.name;
11058
+ const groupOffset = this.groupColumn == null ? 0 : 1;
11059
+ if (groupOffset === 1 && x === 0 && y !== 0) {
11060
+ const rowDepth = ((_b = this.row(y)) == null ? void 0 : _b.depth) ?? 2;
11061
+ const keyCount = this.keyColumns.length;
11062
+ if (rowDepth > 0 && rowDepth < keyCount) {
11063
+ const sourceKeyColumn = this.keyColumns[rowDepth - 1];
11064
+ columnType = sourceKeyColumn.type;
11065
+ columnName = sourceKeyColumn.name;
11066
+ }
11067
+ }
11056
11068
  const hasCustomColumnFormat = this.getCachedCustomColumnFormatFlag(
11057
11069
  this.formatter,
11058
- column.name,
11059
- column.type
11070
+ columnName,
11071
+ columnType
11060
11072
  );
11061
11073
  let formatOverride;
11062
11074
  if (!hasCustomColumnFormat) {
@@ -11067,8 +11079,8 @@ class IrisGridPivotModel extends irisGrid.IrisGridModel {
11067
11079
  }
11068
11080
  const text = this.displayString(
11069
11081
  value2,
11070
- column.type,
11071
- column.name,
11082
+ columnType,
11083
+ columnName,
11072
11084
  formatOverride
11073
11085
  );
11074
11086
  this.cacheFormattedValue(x, y, text);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/js-plugin-pivot",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Pivot plugin for Deephaven",
5
5
  "keywords": [
6
6
  "Deephaven",
@@ -58,5 +58,5 @@
58
58
  "files": [
59
59
  "dist/index.js"
60
60
  ],
61
- "gitHead": "aa57501928427c83086811d7700bfcc4e6962265"
61
+ "gitHead": "f4c63561653c0fc10fe62108c1020543d403fd8a"
62
62
  }