Change for evalution: always display all rows

pull/4625/head
Roman Roelofsen 8 years ago
parent a34ec30b89
commit 6cc1ae1b7b
  1. 12
      frontend/app/components/wp-table/wp-virtual-scroll.directive.ts

@ -121,16 +121,18 @@ class RowDisplay {
} }
private isRowInViewportOffset() { private isRowInViewportOffset() {
const offset = this.workPackageTableVirtualScrollService.viewportOffset; return true;
return this.index >= (this.viewport[0] - offset) && this.index <= (this.viewport[1] + offset); // const offset = this.workPackageTableVirtualScrollService.viewportOffset;
// return this.index >= (this.viewport[0] - offset) && this.index <= (this.viewport[1] + offset);
} }
private viewportChanged() { private viewportChanged() {
const isRowInViewport = this.isRowInViewportOffset(); const isRowInViewport = this.isRowInViewportOffset();
const enableWatchers = this.isRowInViewport(); const enableWatchers = this.isRowInViewport();
if (this.visible === undefined) { const firstRun = this.visible === undefined;
// First run
if (firstRun) {
this.renderRow(isRowInViewport); this.renderRow(isRowInViewport);
} else if (!this.visible && isRowInViewport) { } else if (!this.visible && isRowInViewport) {
this.hide(); this.hide();
@ -139,7 +141,7 @@ class RowDisplay {
this.renderRow(false); this.renderRow(false);
} }
if (this.clone) { if (!firstRun && this.clone) {
this.adjustWatchers(this.clone, enableWatchers); this.adjustWatchers(this.clone, enableWatchers);
} }
} }

Loading…
Cancel
Save