Fixes watcher de-/registration

pull/4745/head
Roman Roelofsen 8 years ago
parent e4bda85fb2
commit ada54829bd
  1. 4
      frontend/app/components/wp-table/wp-virtual-scroll.directive.ts

@ -88,13 +88,13 @@ class RowDisplay {
this.watchersEnabled = enableWatchers;
const scope: any = angular.element(element).scope();
if (scope === undefined || !element.length) {
if (scope === undefined) {
return;
}
// Do not toggle watch state on table rows themselves
// since watchers are needed for, e.g., group collapsing
if (element[0].tagName !== 'TR') {
if (!(element.length > 0 && element[0].tagName === 'TR')) {
this.setWatchState(scope, enableWatchers);
}

Loading…
Cancel
Save