mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
Performance improvements (#1166)
#1166 * Update angular libs document-list: performance improvements caching ‘heavy’ cell evaluations (i.e. date pipe) code/test fixes document-list: performance improvements Removed ‘AfterViewChecked’ bottleneck as underlying data-table already does it. data-table: performance improvements
This commit is contained in:
committed by
Eugenio Romano
parent
0f563e38bb
commit
3ca2c28a41
@@ -272,11 +272,6 @@ describe('DocumentList', () => {
|
||||
expect(documentList.executeContentAction).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should upgrade material design components', () => {
|
||||
documentList.ngAfterViewChecked();
|
||||
expect(componentHandler.upgradeAllRegistered).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should subscribe to context action handler', () => {
|
||||
spyOn(documentList, 'displayFolderContent').and.stub();
|
||||
spyOn(documentList, 'contextActionCallback').and.stub();
|
||||
|
@@ -22,7 +22,6 @@ import {
|
||||
Output,
|
||||
EventEmitter,
|
||||
AfterContentInit,
|
||||
AfterViewChecked,
|
||||
TemplateRef,
|
||||
NgZone,
|
||||
ViewChild,
|
||||
@@ -41,15 +40,13 @@ import {
|
||||
ImageResolver
|
||||
} from './../data/share-datatable-adapter';
|
||||
|
||||
declare var componentHandler;
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'alfresco-document-list',
|
||||
styleUrls: ['./document-list.css'],
|
||||
templateUrl: './document-list.html'
|
||||
})
|
||||
export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit {
|
||||
export class DocumentList implements OnInit, AfterContentInit {
|
||||
|
||||
static SINGLE_CLICK_NAVIGATION: string = 'click';
|
||||
static DOUBLE_CLICK_NAVIGATION: string = 'dblclick';
|
||||
@@ -196,16 +193,8 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
|
||||
return false;
|
||||
}
|
||||
|
||||
ngAfterViewChecked() {
|
||||
// workaround for MDL issues with dynamic components
|
||||
if (componentHandler) {
|
||||
componentHandler.upgradeAllRegistered();
|
||||
}
|
||||
}
|
||||
|
||||
isMobile(): boolean {
|
||||
return !!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
|
||||
}
|
||||
|
||||
getNodeActions(node: MinimalNodeEntity): ContentActionModel[] {
|
||||
|
Reference in New Issue
Block a user