mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2102] Task List - Provide a way to support custom html template and static columns at same time (#2793)
* Removed lodash import from tasklist component. * Refactored getschema method.
This commit is contained in:
committed by
Maurizio Vitale
parent
553ae4db7b
commit
1b50094cc5
@@ -19,7 +19,6 @@ import { DataColumn, DataRowEvent, DataTableAdapter, ObjectDataColumn, ObjectDat
|
|||||||
import { AppConfigService, DataColumnListComponent } from '@alfresco/adf-core';
|
import { AppConfigService, DataColumnListComponent } from '@alfresco/adf-core';
|
||||||
import { AfterContentInit, Component, ContentChild, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
import { AfterContentInit, Component, ContentChild, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import * as _ from 'lodash';
|
|
||||||
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||||
import { TaskListModel } from '../models/task-list.model';
|
import { TaskListModel } from '../models/task-list.model';
|
||||||
import { taskPresetsDefaultModel } from '../models/task-preset.model';
|
import { taskPresetsDefaultModel } from '../models/task-preset.model';
|
||||||
@@ -344,8 +343,7 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
|||||||
|
|
||||||
getSchema(): any {
|
getSchema(): any {
|
||||||
let customSchemaColumns = [];
|
let customSchemaColumns = [];
|
||||||
customSchemaColumns = _.concat(customSchemaColumns, this.getSchemaFromConfig(this.presetColumn));
|
customSchemaColumns = this.getSchemaFromConfig(this.presetColumn).concat(this.getSchemaFromHtml());
|
||||||
customSchemaColumns = _.concat(customSchemaColumns, this.getSchemaFromHtml());
|
|
||||||
if (customSchemaColumns.length === 0) {
|
if (customSchemaColumns.length === 0) {
|
||||||
customSchemaColumns = this.getDefaultLayoutPreset();
|
customSchemaColumns = this.getDefaultLayoutPreset();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user