Skip to content

Commit

Permalink
Add expand/collapse affordance in the left column header of ZoneGrids. (
Browse files Browse the repository at this point in the history
  • Loading branch information
febbraiod authored Sep 18, 2024
1 parent 6c8d5df commit 44cad8f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

* Requires `hoist-core >= 21.1` for consolidated polling of Alert Banner updates (see below).

### 🎁 New Features

* Added expand/collapse affordance in the left column header of ZoneGrids in tree mode.

### ⚙️ Technical

* Updated Admin Console's Cluster tab to refresh more frequently.
Expand Down
2 changes: 1 addition & 1 deletion cmp/grid/columns/Column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,6 @@ export class Column {

return isFunction(sortValue)
? sortValue(v, {record, column: this, gridModel})
: record?.data[sortValue] ?? v;
: (record?.data[sortValue] ?? v);
}
}
5 changes: 3 additions & 2 deletions cmp/zoneGrid/ZoneGridModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,15 +583,15 @@ export class ZoneGridModel extends HoistModel {
const colId = it.field;
subFields.push({
colId,
label: it.showLabel ? labelRenderers[colId] ?? true : false,
label: it.showLabel ? (labelRenderers[colId] ?? true) : false,
position: 'top'
});
});
bottomMappings.forEach(it => {
const colId = it.field;
subFields.push({
colId,
label: it.showLabel ? labelRenderers[colId] ?? true : false,
label: it.showLabel ? (labelRenderers[colId] ?? true) : false,
position: 'bottom'
});
});
Expand All @@ -608,6 +608,7 @@ export class ZoneGridModel extends HoistModel {
// Controlled properties
field: isLeft ? 'left_column' : 'right_column',
align: isLeft ? 'left' : 'right',
isTreeColumn: gridModel?.treeMode && isLeft,
flex: overrideSpec.width ? null : isLeft ? 2 : 1,
renderer: (value, context) => zoneGridRenderer(value, context, isLeft),
rendererIsComplex: true,
Expand Down

0 comments on commit 44cad8f

Please sign in to comment.