Fixed the main filter buttons losing focus

pull/3996/head
tidusjar 4 years ago
parent f7a5abe81f
commit 23e9569de5

@ -1,8 +1,8 @@
<div class="right">
<mat-button-toggle-group name="discoverMode" class="discover-filter-buttons-group">
<mat-button-toggle ngDefaultControl (click)="switchDiscoverMode(DiscoverOption.Combined)" [(ngModel)]="discoverOptions" value="{{DiscoverOption.Combined}}" class="discover-filter-button">{{'Discovery.Combined' | translate}}</mat-button-toggle>
<mat-button-toggle ngDefaultControl (click)="switchDiscoverMode(DiscoverOption.Movie)" [(ngModel)]="discoverOptions" value="{{DiscoverOption.Movie}}" class="discover-filter-button">{{'Discovery.Movies' | translate}}</mat-button-toggle>
<mat-button-toggle ngDefaultControl (click)="switchDiscoverMode(DiscoverOption.Tv)" [(ngModel)]="discoverOptions" value="{{DiscoverOption.Tv}}" class="discover-filter-button">{{'Discovery.Tv' | translate}}</mat-button-toggle>
<mat-button-toggle-group name="discoverMode" value="{{discoverOptions}}" class="discover-filter-buttons-group">
<mat-button-toggle ngDefaultControl [class.cdk-focused]="discoverOptions === DiscoverOption.Combined" (click)="switchDiscoverMode(DiscoverOption.Combined)" [(ngModel)]="discoverOptions" value="{{DiscoverOption.Combined}}" class="discover-filter-button">{{'Discovery.Combined' | translate}}</mat-button-toggle>
<mat-button-toggle ngDefaultControl [class.cdk-focused]="discoverOptions === DiscoverOption.Movie" (click)="switchDiscoverMode(DiscoverOption.Movie)" [(ngModel)]="discoverOptions" value="{{DiscoverOption.Movie}}" class="discover-filter-button">{{'Discovery.Movies' | translate}}</mat-button-toggle>
<mat-button-toggle ngDefaultControl [class.cdk-focused]="discoverOptions === DiscoverOption.Tv" (click)="switchDiscoverMode(DiscoverOption.Tv)" [(ngModel)]="discoverOptions" value="{{DiscoverOption.Tv}}" class="discover-filter-button">{{'Discovery.Tv' | translate}}</mat-button-toggle>
</mat-button-toggle-group>
</div>

@ -80,7 +80,7 @@
background:$ombi-active;
}
.discover-filter-button .mat-button-toggle-button:focus{
::ng-deep .discover-filter-button .mat-button-toggle-button:focus{
outline:none;
}
}

@ -87,6 +87,9 @@ export class CarouselListComponent implements OnInit {
}
public async switchDiscoverMode(newMode: DiscoverOption) {
if (this.discoverOptions === newMode) {
return;
}
this.loading();
this.clear();
this.discoverOptions = newMode;

Loading…
Cancel
Save