Skip to content

Commit 76aa753

Browse files
Show count of hidden columns when editing a row (#12264)
* feat(grid): show count of hidden columns when editing a row * chore(grid): fix failing test
1 parent 039a0de commit 76aa753

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ All notable changes for each version of this project will be documented in this
2222
- `dragIndicatorIconTemplate` - Gets/Sets the custom template used for row drag indicator.
2323
- `detailTemplate` - Gets/Sets the master-detail template.
2424

25+
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
26+
- **Behavioral Change** - When editing a row, `rowChangesCount` and `hiddenColumnsCount`would be displayed.
27+
2528
## 14.2.0
2629

2730
### New Features

projects/igniteui-angular/src/lib/grids/grid/grid-row-editing.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ describe('IgxGrid - Row Editing #grid', () => {
787787
});
788788

789789
it(`Should update row changes when focus overlay buttons on tabbing`, (async () => {
790+
grid.getColumnByName("ID").hidden = true;
790791
grid.tbody.nativeElement.focus();
791792
fix.detectChanges();
792793

@@ -807,7 +808,7 @@ describe('IgxGrid - Row Editing #grid', () => {
807808
UIInteractions.triggerEventHandlerKeyDown('tab', gridContent, false, true);
808809
fix.detectChanges();
809810

810-
expect(GridFunctions.getRowEditingBannerText(fix)).toBe('You have 1 changes in this row');
811+
expect(GridFunctions.getRowEditingBannerText(fix)).toBe('You have 1 changes in this row and 1 hidden columns');
811812

812813
// go to last editable cell
813814
grid.rowEditTabs.first.handleTab(UIInteractions.getKeyboardEvent('keydown', 'tab', false, true));
@@ -827,7 +828,7 @@ describe('IgxGrid - Row Editing #grid', () => {
827828
UIInteractions.triggerEventHandlerKeyDown('tab', gridContent);
828829
fix.detectChanges();
829830

830-
expect(GridFunctions.getRowEditingBannerText(fix)).toBe('You have 2 changes in this row');
831+
expect(GridFunctions.getRowEditingBannerText(fix)).toBe('You have 2 changes in this row and 1 hidden columns');
831832
}));
832833

833834
it(`Should focus last edited cell after click on editable buttons`, (async () => {

projects/igniteui-angular/src/lib/grids/grid/grid.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
</div>
241241

242242
<ng-template #defaultRowEditText>
243-
You have {{ rowChangesCount }} changes in this row
243+
You have {{ rowChangesCount }} changes in this row and {{ hiddenColumnsCount }} hidden columns
244244
</ng-template>
245245

246246
<ng-template #defaultRowEditActions>

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
</div>
194194
</div>
195195
<ng-template #defaultRowEditText>
196-
You have {{ rowChangesCount }} changes in this row
196+
You have {{ rowChangesCount }} changes in this row and {{ hiddenColumnsCount }} hidden columns
197197
</ng-template>
198198
<ng-template #defaultRowEditActions>
199199
<button igxButton igxRowEditTabStop (click)="this.endRowEditTabStop(false, $event)">{{ this.resourceStrings.igx_grid_row_edit_btn_cancel }}</button>

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1585,7 +1585,7 @@ describe('IgxHierarchicalGrid Runtime Row Island change Scenarios #hGrid', () =>
15851585
const mainGridOverlayTextContent = mainGridOverlay.querySelector('.igx-banner__text').textContent;
15861586
const mainGridOverlayActionsContent = mainGridOverlay.querySelector('.igx-banner__actions').textContent;
15871587

1588-
expect(mainGridOverlayTextContent).toBe(' You have 0 changes in this row\n');
1588+
expect(mainGridOverlayTextContent).toBe(' You have 0 changes in this row and 0 hidden columns\n');
15891589
expect(mainGridOverlayActionsContent).toBe('CancelDone');
15901590

15911591
hierarchicalGrid.expandRow(hierarchicalGrid.getRowByIndex(0).key);

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
</div>
182182

183183
<ng-template #defaultRowEditText>
184-
You have {{ rowChangesCount }} changes in this row
184+
You have {{ rowChangesCount }} changes in this row and {{ hiddenColumnsCount }} hidden columns
185185
</ng-template>
186186

187187
<ng-template #defaultRowEditActions>

0 commit comments

Comments
 (0)