File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
projects/igniteui-angular/src/lib/grids Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -7021,18 +7021,20 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
70217021 }
70227022
70237023 protected checkContainerSizeChange ( ) {
7024- const origHeight = this . nativeElement . parentElement . offsetHeight ;
7024+ const parentElement = this . nativeElement . parentElement || ( this . nativeElement . getRootNode ( ) as any ) . host ;
7025+ const origHeight = parentElement . offsetHeight ;
70257026 this . nativeElement . style . display = 'none' ;
7026- const height = this . nativeElement . parentElement . offsetHeight ;
7027+ const height = parentElement . offsetHeight ;
70277028 this . nativeElement . style . display = '' ;
70287029 return origHeight !== height ;
70297030 }
70307031
70317032 protected _shouldAutoSize ( renderedHeight ) {
70327033 this . tbody . nativeElement . style . display = 'none' ;
7033- let res = ! this . nativeElement . parentElement ||
7034- this . nativeElement . parentElement . clientHeight === 0 ||
7035- this . nativeElement . parentElement . clientHeight === renderedHeight ;
7034+ const parentElement = this . nativeElement . parentElement || ( this . nativeElement . getRootNode ( ) as any ) . host ;
7035+ let res = ! parentElement ||
7036+ parentElement . clientHeight === 0 ||
7037+ parentElement . clientHeight === renderedHeight ;
70367038 if ( ( ! this . platform . isChromium && ! this . platform . isFirefox ) || this . _autoSize ) {
70377039 // If grid causes the parent container to extend (for example when container is flex)
70387040 // we should always auto-size since the actual size of the container will continuously change as the grid renders elements.
You can’t perform that action at this time.
0 commit comments