Skip to content

Commit

Permalink
fix(ngrid): competability with cdk 8.1.3
Browse files Browse the repository at this point in the history
Fixes #37
  • Loading branch information
shlomiassaf committed Aug 18, 2019
1 parent c2cf4b6 commit e1a9ec8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
Spacer used to force the scrolling container to the correct size for the *total* number of items
so that the scrollbar captures the size of the entire data set.
-->
<div class="cdk-virtual-scroll-spacer" [style.transform]="_totalContentSizeTransform"></div>
<div class="cdk-virtual-scroll-spacer"
[style.width]="_totalContentWidth" [style.height]="_totalContentHeight"
[style.transform]="_totalContentSizeTransform"></div>
<div *ngIf="pblFillerHeight"
class="pbl-ngrid-space-fill"
[style.minWidth.px]="minWidth"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,20 @@ export class PblCdkVirtualScrollViewportComponent extends CdkVirtualScrollViewpo
return this.elementRef.nativeElement.getBoundingClientRect().width;
}

/// TODO(shlomiassaf): Remove when not supporting 8.1.2 and below
/// COMPATIBILITY 8.1.2- <-> 8.1.3+
/** A string representing the `style.width` property value to be used for the spacer element. */
_totalContentWidth = '';
/** A string representing the `style.height` property value to be used for the spacer element. */
_totalContentHeight = '';
/**
* The transform used to scale the spacer to the same size as all content, including content that
* is not currently rendered.
* @deprecated
*/
_totalContentSizeTransform = '';
/// COMPATIBILITY 8.1.2- <-> 8.1.3+

private offsetChange$ = new Subject<number>();
private offset: number;
private isCDPending: boolean;
Expand Down

0 comments on commit e1a9ec8

Please sign in to comment.