Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add expand/collapse affordance in the left column header of ZoneGrids. #3790

Merged
merged 7 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading