File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
- < span class ="ant-table-row-indent " *ngIf ="nzIndentSize " [style.padding-left.px] ="nzIndentSize "> </ span >
1
+ < span class ="ant-table-row-indent " *ngIf ="nzIndentSize >= 0 " [style.padding-left.px] ="nzIndentSize "> </ span >
2
2
< label
3
3
*ngIf ="nzShowCheckbox "
4
4
nz-checkbox
7
7
[nzIndeterminate] ="nzIndeterminate "
8
8
(ngModelChange) ="nzCheckedChange.emit($event) ">
9
9
</ label >
10
+ < span
11
+ *ngIf ="!nzShowExpand && nzIndentSize != null "
12
+ class ="ant-table-row-expand-icon ant-table-row-spaced "> </ span >
10
13
< span
11
14
*ngIf ="nzShowExpand "
12
15
class ="ant-table-row-expand-icon "
Original file line number Diff line number Diff line change @@ -100,6 +100,17 @@ describe('nz-td', () => {
100
100
expect ( td . nativeElement . querySelector ( '.ant-table-row-expand-icon' ) . classList ) . toContain ( 'ant-table-row-expanded' ) ;
101
101
expect ( testComponent . expandChange ) . toHaveBeenCalledTimes ( 1 ) ;
102
102
} ) ;
103
+ it ( 'should be row index when index-size is 0' , ( ) => {
104
+ testComponent . indentSize = 0 ;
105
+ fixture . detectChanges ( ) ;
106
+ expect ( td . nativeElement . querySelector ( '.ant-table-row-indent' ) ) . not . toBeNull ( ) ;
107
+ } ) ;
108
+ it ( 'should be keeping space when hidden expand and index-size is not null' , ( ) => {
109
+ testComponent . showExpand = false ;
110
+ testComponent . indentSize = 0 ;
111
+ fixture . detectChanges ( ) ;
112
+ expect ( td . nativeElement . querySelector ( '.ant-table-row-expand-icon' ) . classList ) . toContain ( 'ant-table-row-spaced' ) ;
113
+ } ) ;
103
114
it ( 'should indentSize work' , ( ) => {
104
115
fixture . detectChanges ( ) ;
105
116
expect ( td . nativeElement . querySelector ( '.ant-table-row-indent' ) ) . toBeNull ( ) ;
You can’t perform that action at this time.
0 commit comments