mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ADF-1487] ADF checklist - fix mdl issue (#2274)
* fix mdl issue in the next release we should redesign this component * Implement the correct interface
This commit is contained in:
parent
7f720fda3a
commit
cbe7db7ed2
@ -15,12 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { AfterViewInit, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { Observable, Observer } from 'rxjs/Rx';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
|
||||
declare let dialogPolyfill: any;
|
||||
let componentHandler: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-checklist, activiti-checklist',
|
||||
@ -28,7 +29,7 @@ declare let dialogPolyfill: any;
|
||||
styleUrls: ['./checklist.component.css'],
|
||||
providers: [TaskListService]
|
||||
})
|
||||
export class ChecklistComponent implements OnInit, OnChanges {
|
||||
export class ChecklistComponent implements OnInit, OnChanges, AfterViewInit {
|
||||
|
||||
@Input()
|
||||
taskId: string;
|
||||
@ -81,6 +82,19 @@ export class ChecklistComponent implements OnInit, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.setupMaterialComponents(componentHandler);
|
||||
}
|
||||
|
||||
setupMaterialComponents(handler?: any): boolean {
|
||||
// workaround for MDL issues with dynamic components
|
||||
if (handler) {
|
||||
handler.upgradeAllRegistered();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public getTaskChecklist(taskId: string) {
|
||||
this.checklist = [];
|
||||
if (this.taskId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user