@@ -643,7 +643,8 @@ class GridBody extends Component {
643643 id = me . getRowId ( rowIndex ) ,
644644 recordId = record [ me . store . getKeyProperty ( ) ] ,
645645 rowCls = me . getRowClass ( record , rowIndex ) ,
646- config , column , columnPosition , gridRow , i ;
646+ countColumns = columns . getCount ( ) ,
647+ config , column , columnPosition , gridRow , i , isMounted ;
647648
648649 if ( rowIndex % 2 !== 0 ) {
649650 rowCls . push ( 'neo-even' )
@@ -673,8 +674,14 @@ class GridBody extends Component {
673674 gridContainer . fire ( 'select' , { record} )
674675 }
675676
676- for ( i = mountedColumns [ 0 ] ; i <= mountedColumns [ 1 ] ; i ++ ) {
677- column = columns . getAt ( i ) ;
677+ for ( i = 0 ; i < countColumns ; i ++ ) {
678+ isMounted = i >= mountedColumns [ 0 ] && i <= mountedColumns [ 1 ] ;
679+ column = columns . getAt ( i ) ;
680+
681+ if ( ! isMounted && column . hideMode === 'removeDom' ) {
682+ continue
683+ }
684+
678685 config = me . applyRendererOutput ( { column, columnIndex : i , record, rowIndex} ) ;
679686
680687 if ( column . dock ) {
@@ -687,11 +694,19 @@ class GridBody extends Component {
687694 ...config . style ,
688695 left : columnPosition . x + 'px' ,
689696 width : columnPosition . width + 'px'
690- }
697+ } ;
691698
692699 // Happens during a column header drag OP, when leaving the painted range
693- if ( columnPosition . hidden ) {
694- config . style . visibility = 'hidden'
700+ if ( isMounted ) {
701+ if ( columnPosition . hidden ) {
702+ config . style . visibility = 'hidden'
703+ }
704+ } else {
705+ if ( column . hideMode === 'visibility' ) {
706+ config . style . visibility = 'hidden'
707+ } else if ( column . hideMode === 'display' ) {
708+ config . style . display = 'none'
709+ }
695710 }
696711
697712 gridRow . cn . push ( config )
0 commit comments