mirror of
https://github.com/zoriya/Kyoo.Angular.git
synced 2026-06-01 02:19:23 +00:00
Fixing studio filter disabling & load from url
This commit is contained in:
@@ -30,7 +30,9 @@
|
||||
<ng-container>
|
||||
<mat-form-field class="w-100 px-3" (click)="$event.stopPropagation();">
|
||||
<mat-label>Studio</mat-label>
|
||||
<input type="text" matInput [matAutocomplete]="autoStudio" [formControl]="studioForm" placeholder="None">
|
||||
<input type="text" matInput [formControl]="studioForm"
|
||||
[matAutocomplete]="autoStudio"
|
||||
[value]="this.nameGetter(this.filters.studio)">
|
||||
<mat-autocomplete autoActiveFirstOption #autoStudio="matAutocomplete"
|
||||
(optionSelected)="this.addFilter('studio', $event.option.value, false)"
|
||||
[displayWith]="this.nameGetter">
|
||||
|
||||
@@ -94,7 +94,6 @@ export class ItemsGridComponent implements OnInit
|
||||
}
|
||||
else if (!slug)
|
||||
this.filters.studio = null;
|
||||
this.studioForm.setValue(this.filters.studio?.name ?? "None", {emitEvent: false});
|
||||
}
|
||||
|
||||
updatePeopleFilterFromQuery(query: Params)
|
||||
@@ -200,7 +199,7 @@ export class ItemsGridComponent implements OnInit
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.filters[category] == filter || this.filters[category]?.slug == filter.slug)
|
||||
if (filter && (this.filters[category] == filter || this.filters[category]?.slug == filter.slug))
|
||||
{
|
||||
if (!toggle)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user