TSK-661 - Filtering of distribution target selection does not work

This commit is contained in:
Jose Ignacio Recuerda Cambil 2018-08-02 17:44:24 +02:00 committed by Martin Rojas Miguel Angel
parent 2dbc0de402
commit 2d397369c5
3 changed files with 18 additions and 6 deletions

View File

@ -15,7 +15,7 @@
</button> </button>
</div> </div>
</div> </div>
<div [@toggleDown]="toolbarState" *ngIf="toolbarState" class="row"> <div [@toggleDownWithoutNgIf]="toolbarState" class="row">
<taskana-filter class="col-xs-12" (performFilter)="performAvailableFilter($event)"></taskana-filter> <taskana-filter class="col-xs-12" (performFilter)="performAvailableFilter($event)"></taskana-filter>
</div> </div>
<taskana-spinner [isRunning]="requestInProgress" positionClass="centered-spinner" class="floating"></taskana-spinner> <taskana-spinner [isRunning]="requestInProgress" positionClass="centered-spinner" class="floating"></taskana-spinner>

View File

@ -2,17 +2,16 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { WorkbasketSummary } from 'app/models/workbasket-summary'; import { WorkbasketSummary } from 'app/models/workbasket-summary';
import { FilterModel } from 'app/models/filter'; import { FilterModel } from 'app/models/filter';
import { Side } from '../distribution-targets.component'; import { Side } from '../distribution-targets.component';
import { expandDown } from 'app/shared/animations/expand.animation'; import { expandDownWithoutNgIf } from 'app/shared/animations/expand.animation';
@Component({ @Component({
selector: 'taskana-dual-list', selector: 'taskana-dual-list',
templateUrl: './dual-list.component.html', templateUrl: './dual-list.component.html',
styleUrls: ['./dual-list.component.scss'], styleUrls: ['./dual-list.component.scss'],
animations: [expandDown] animations: [expandDownWithoutNgIf]
}) })
export class DualListComponent implements OnInit { export class DualListComponent implements OnInit {
@Input() distributionTargets: Array<WorkbasketSummary>; @Input() distributionTargets: Array<WorkbasketSummary>;
@Output() distributionTargetsChange = new EventEmitter<Array<WorkbasketSummary>>(); @Output() distributionTargetsChange = new EventEmitter<Array<WorkbasketSummary>>();
@Input() distributionTargetsSelected: Array<WorkbasketSummary>; @Input() distributionTargetsSelected: Array<WorkbasketSummary>;

View File

@ -14,6 +14,19 @@ export const expandDown =
style({ opacity: 0, height: '0px' })]))) style({ opacity: 0, height: '0px' })])))
]); ]);
export const expandDownWithoutNgIf =
trigger('toggleDownWithoutNgIf', [
state('true', style({ opacity: '1', display: 'block' })),
state('false', style({ opacity: '0', display: 'none' })),
transition('false => true', animate('300ms ease-in', keyframes([
style({ opacity: 0, height: '0px' }),
style({ opacity: 0.5, height: '50px' }),
style({ opacity: 1, height: '*' })]))),
transition('true => false', animate('300ms ease-out', keyframes([
style({ opacity: 1, height: '*' }),
style({ opacity: 0.5, height: '50px' }),
style({ opacity: 0, height: '0px' })])))
]);
export const expandRight = trigger('toggleRight', [ export const expandRight = trigger('toggleRight', [
transition('void => *', animate('300ms ease-in', keyframes([ transition('void => *', animate('300ms ease-in', keyframes([