OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/frontend/app/components/wp-fast-table/handlers/state/columns-transformer.ts

30 lines
895 B

import {debugLog} from '../../../../helpers/debug_output';
import {injectorBridge} from '../../../angular/angular-injector-bridge.functions';
import {States} from '../../../states.service';
import {WorkPackageTable} from '../../wp-fast-table';
export class ColumnsTransformer {
public states:States;
constructor(public table: WorkPackageTable) {
injectorBridge(this);
this.states.updates.columnsUpdates
.values$('Refreshing columns on user request')
.takeUntil(this.states.table.stopAllSubscriptions)
.subscribe(() => {
if (table.rows.length > 0) {
var t0 = performance.now();
// Redraw the table section, ignore timeline
table.redrawTable();
var t1 = performance.now();
debugLog("column redraw took " + (t1 - t0) + " milliseconds.");
}
});
}
}
ColumnsTransformer.$inject = ['states'];