mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3080] Remove selecting first filter by default when no defaults … (#5619)
* [ACA-3080] Remove selecting first filter by default when no defaults are provided * [ACA-3080] Fix demo shell, emit when filter is selected * [ACA-3080] Align demo shell * [ACA-3080] Align task filters demo shell, emit when task filter selected
This commit is contained in:
@@ -30,6 +30,7 @@ import { takeUntil } from 'rxjs/operators';
|
||||
export class TasksCloudDemoComponent implements OnInit, OnDestroy {
|
||||
|
||||
public static ACTION_SAVE_AS = 'saveAs';
|
||||
public static ACTION_DELETE = 'delete';
|
||||
static TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
|
||||
|
||||
@ViewChild('taskCloud')
|
||||
@@ -133,7 +134,13 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
onTaskFilterAction(filterAction: any) {
|
||||
this.cloudLayoutService.setCurrentTaskFilterParam({ id: filterAction.filter.id });
|
||||
|
||||
if (filterAction.actionType === TasksCloudDemoComponent.ACTION_DELETE) {
|
||||
this.cloudLayoutService.setCurrentTaskFilterParam({ index: 0 });
|
||||
} else {
|
||||
this.cloudLayoutService.setCurrentTaskFilterParam({ id: filterAction.filter.id });
|
||||
}
|
||||
|
||||
if (filterAction.actionType === TasksCloudDemoComponent.ACTION_SAVE_AS) {
|
||||
this.router.navigate([`/cloud/${this.appName}/tasks/`], { queryParams: filterAction.filter });
|
||||
}
|
||||
|
Reference in New Issue
Block a user