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:
@@ -2,7 +2,7 @@
|
||||
<mat-list class="adf-menu-list">
|
||||
<mat-list-item (click)="selectFilterAndEmit(filter)" *ngFor="let filter of filters"
|
||||
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>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
@@ -355,9 +355,9 @@ describe('TaskFiltersComponent', () => {
|
||||
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));
|
||||
component.hasIcon = true;
|
||||
component.showIcon = true;
|
||||
let change = new SimpleChange(undefined, 1, true);
|
||||
component.ngOnChanges({ 'appId': change });
|
||||
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));
|
||||
component.hasIcon = false;
|
||||
component.showIcon = false;
|
||||
let change = new SimpleChange(undefined, 1, true);
|
||||
component.ngOnChanges({ 'appId': change });
|
||||
fixture.detectChanges();
|
||||
|
@@ -61,7 +61,7 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
|
||||
|
||||
/** Toggles display of the filter's icon. */
|
||||
@Input()
|
||||
hasIcon: boolean;
|
||||
showIcon: boolean;
|
||||
|
||||
filter$: Observable<FilterRepresentationModel>;
|
||||
|
||||
|
Reference in New Issue
Block a user