Skip to content

Commit f57b90b

Browse files
committed
chore(igxTreeGrid): Automates pinned chip removal for filtered out parents
1 parent ffac9a0 commit f57b90b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,7 @@ describe('IgxTreeGrid - Integration #tGrid', () => {
14571457

14581458
});
14591459

1460-
it('should add pinned badge in the pinned row instance in the body', () => {
1460+
it('should add chip badge in the pinned row instance in the body', () => {
14611461
const rowToPin = treeGrid.getRowByIndex(0);
14621462
const primaryKey = treeGrid.primaryKey;
14631463

@@ -1587,5 +1587,20 @@ describe('IgxTreeGrid - Integration #tGrid', () => {
15871587
{ID: 475, Name: 'Michael Langdon'},
15881588
]);
15891589
});
1590+
1591+
it('should remove the pinned chip for filtered out parent', () => {
1592+
treeGrid.pinRow(147);
1593+
fix.detectChanges();
1594+
1595+
treeGrid.filter('ID', 957, IgxStringFilteringOperand.instance().condition('contains'), false);
1596+
fix.detectChanges();
1597+
1598+
const firstColumnField = treeGrid.columns[0].field;
1599+
const pinnedChipExpectedPosition = treeGrid.getCellByColumn(1, firstColumnField);
1600+
const pinnedRow = pinnedChipExpectedPosition.row;
1601+
1602+
expect(pinnedChipExpectedPosition.nativeElement.getElementsByClassName('igx-grid__td--pinned-chip').length).toBe(0);
1603+
expect(pinnedRow.disabled).toBe(false);
1604+
});
15901605
});
15911606
});

0 commit comments

Comments
 (0)