File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 235
235
}
236
236
237
237
_renderHeaderAndFooter ( ) {
238
- if ( this . headerRenderer ) {
238
+ if ( this . headerRenderer && this . _headerCell ) {
239
239
this . __runRenderer ( this . headerRenderer , this . _headerCell ) ;
240
240
}
241
- if ( this . footerRenderer ) {
241
+ if ( this . footerRenderer && this . _footerCell ) {
242
242
this . __runRenderer ( this . footerRenderer , this . _footerCell ) ;
243
243
}
244
244
}
Original file line number Diff line number Diff line change 182
182
expect ( spy . called ) . to . be . false ;
183
183
} ) ;
184
184
185
- it ( 'should dettach cells from a hidden column' , ( ) => {
185
+ it ( 'should detach cells from a hidden column' , ( ) => {
186
186
const childCountBefore = grid . childElementCount ;
187
187
column . hidden = true ;
188
188
const childCountAfter = grid . childElementCount ;
189
189
expect ( childCountAfter ) . to . be . below ( childCountBefore ) ;
190
190
} ) ;
191
+
192
+ it ( 'should not throw on render with initially hidden columns with header/footerRenderer' , ( ) => {
193
+ const newColumn = document . createElement ( 'vaadin-grid-column' ) ;
194
+ newColumn . hidden = true ;
195
+ newColumn . headerRenderer = ( ) => { } ;
196
+ newColumn . footerRenderer = ( ) => { } ;
197
+ grid . appendChild ( newColumn ) ;
198
+ flushGrid ( grid ) ;
199
+ expect ( ( ) => grid . render ( ) ) . not . to . throw ( Error ) ;
200
+ } ) ;
191
201
} ) ;
192
202
193
203
describe ( 'path' , ( ) => {
You can’t perform that action at this time.
0 commit comments