File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 610
610
}
611
611
columns
612
612
. filter ( column => ! column . hidden )
613
- . forEach ( ( column , index ) => {
613
+ . forEach ( ( column , index , cols ) => {
614
614
let cell ;
615
615
616
616
if ( section === 'body' ) {
624
624
cell . setAttribute ( 'part' , 'cell body-cell' ) ;
625
625
row . appendChild ( cell ) ;
626
626
627
- if ( index === columns . length - 1 && ( this . _rowDetailsTemplate || this . rowDetailsRenderer ) ) {
627
+ if ( index === cols . length - 1 && ( this . _rowDetailsTemplate || this . rowDetailsRenderer ) ) {
628
628
// Add details cell as last cell to body rows
629
629
this . _detailsCells = this . _detailsCells || [ ] ;
630
630
const detailsCell = this . _detailsCells . filter ( cell => cell . _vacant ) [ 0 ] || this . _createCell ( 'td' ) ;
Original file line number Diff line number Diff line change 198
198
flushGrid ( grid ) ;
199
199
expect ( ( ) => grid . render ( ) ) . not . to . throw ( Error ) ;
200
200
} ) ;
201
+
202
+ it ( 'should not remove details row when a column is hidden' , ( ) => {
203
+ grid . rowDetailsRenderer = root => root . textContent = 'row-details' ;
204
+ grid . detailsOpenedItems = [ grid . _cache . items [ 0 ] ] ;
205
+ column . hidden = true ;
206
+ flushGrid ( grid ) ;
207
+ const details = grid . shadowRoot . querySelector ( '#items [part~="details-cell"]' ) . _content ;
208
+ expect ( details . textContent ) . to . equal ( 'row-details' ) ;
209
+ } ) ;
201
210
} ) ;
202
211
203
212
describe ( 'path' , ( ) => {
You can’t perform that action at this time.
0 commit comments