mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
rename hasIcon to shoIcon to be equal to process-filter (#3855)
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
<adf-task-filters
|
<adf-task-filters
|
||||||
[filterParam]="filterSelected"
|
[filterParam]="filterSelected"
|
||||||
[appId]="appId"
|
[appId]="appId"
|
||||||
[hasIcon]="showTaskFilterIcon"
|
[showIcon]="showTaskFilterIcon"
|
||||||
(filterClick)="onTaskFilterClick($event)"
|
(filterClick)="onTaskFilterClick($event)"
|
||||||
(success)="onSuccessTaskFilterList($event)"
|
(success)="onSuccessTaskFilterList($event)"
|
||||||
#activitifilter>
|
#activitifilter>
|
||||||
|
@@ -34,7 +34,7 @@ Shows all available filters.
|
|||||||
| appId | `number` | | Display filters available to the current user for the application with the specified ID. |
|
| appId | `number` | | Display filters available to the current user for the application with the specified ID. |
|
||||||
| appName | `string` | | Display filters available to the current user for the application with the specified name. |
|
| appName | `string` | | Display filters available to the current user for the application with the specified name. |
|
||||||
| filterParam | [`FilterParamsModel`](../../lib/process-services/task-list/models/filter.model.ts) | | Parameters to use for the task filter. If there is no match then the default filter (the first one the list) is selected. |
|
| filterParam | [`FilterParamsModel`](../../lib/process-services/task-list/models/filter.model.ts) | | Parameters to use for the task filter. If there is no match then the default filter (the first one the list) is selected. |
|
||||||
| hasIcon | `boolean` | true | Toggles display of the filter's icon. |
|
| showIcon| `boolean` | true | Toggles display of the filter's icon. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<mat-list class="adf-menu-list">
|
<mat-list class="adf-menu-list">
|
||||||
<mat-list-item (click)="selectFilterAndEmit(filter)" *ngFor="let filter of filters"
|
<mat-list-item (click)="selectFilterAndEmit(filter)" *ngFor="let filter of filters"
|
||||||
class="adf-filters__entry" [class.active]="currentFilter === filter">
|
class="adf-filters__entry" [class.active]="currentFilter === filter">
|
||||||
<mat-icon *ngIf="hasIcon" matListIcon class="adf-filters__entry-icon">{{getFilterIcon(filter.icon)}}</mat-icon>
|
<mat-icon *ngIf="showIcon" matListIcon class="adf-filters__entry-icon">{{getFilterIcon(filter.icon)}}</mat-icon>
|
||||||
<span matLine [attr.data-automation-id]="filter.name + '_filter'">{{filter.name}}</span>
|
<span matLine [attr.data-automation-id]="filter.name + '_filter'">{{filter.name}}</span>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
|
@@ -355,9 +355,9 @@ describe('TaskFiltersComponent', () => {
|
|||||||
expect(component.currentFilter).toBe(filter);
|
expect(component.currentFilter).toBe(filter);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should attach specific icon for each filter if hasIcon is true', (done) => {
|
it('should attach specific icon for each filter if showIcon is true', (done) => {
|
||||||
spyOn(taskFilterService, 'getTaskListFilters').and.returnValue(from(fakeGlobalFilterPromise));
|
spyOn(taskFilterService, 'getTaskListFilters').and.returnValue(from(fakeGlobalFilterPromise));
|
||||||
component.hasIcon = true;
|
component.showIcon = true;
|
||||||
let change = new SimpleChange(undefined, 1, true);
|
let change = new SimpleChange(undefined, 1, true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({ 'appId': change });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
@@ -373,9 +373,9 @@ describe('TaskFiltersComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not attach icons for each filter if hasIcon is false', (done) => {
|
it('should not attach icons for each filter if showIcon is false', (done) => {
|
||||||
spyOn(taskFilterService, 'getTaskListFilters').and.returnValue(from(fakeGlobalFilterPromise));
|
spyOn(taskFilterService, 'getTaskListFilters').and.returnValue(from(fakeGlobalFilterPromise));
|
||||||
component.hasIcon = false;
|
component.showIcon = false;
|
||||||
let change = new SimpleChange(undefined, 1, true);
|
let change = new SimpleChange(undefined, 1, true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({ 'appId': change });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@@ -61,7 +61,7 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
/** Toggles display of the filter's icon. */
|
/** Toggles display of the filter's icon. */
|
||||||
@Input()
|
@Input()
|
||||||
hasIcon: boolean;
|
showIcon: boolean;
|
||||||
|
|
||||||
filter$: Observable<FilterRepresentationModel>;
|
filter$: Observable<FilterRepresentationModel>;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user