mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 2010: fix(reward-shopping-cart-item, filter-service): exclude downloads and text in...
fix(reward-shopping-cart-item, filter-service): exclude downloads and text inputs from counts Hide low stock warning for download items in reward shopping cart, as downloads don't have physical inventory constraints. Exclude text/searchbox inputs from selected filter count calculation to prevent search queries from inflating the filter badge counter. Remove unused isIconButtonActive computed property in filter menu button. Ref: #5441
This commit is contained in:
committed by
Lorenz Hilpert
parent
731df8414d
commit
11e2aaff8d
@@ -493,7 +493,8 @@ export class FilterService {
|
||||
return currentState.inputs.reduce((count, input) => {
|
||||
// Simply check if input differs from default state
|
||||
// This handles all cases including NumberRange with default values
|
||||
if (!this.isDefaultFilterInput(input)) {
|
||||
// Excluding Text (Searchbox) inputs from the count
|
||||
if (!this.isDefaultFilterInput(input) && input.type !== InputType.Text) {
|
||||
return count + 1;
|
||||
}
|
||||
return count;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#trigger="cdkOverlayOrigin"
|
||||
(click)="toggle()"
|
||||
type="button"
|
||||
[class.active]="isIconButtonActive()"
|
||||
[class.active]="!!selected"
|
||||
data-what="filter-button"
|
||||
>
|
||||
@if (selected > 0) {
|
||||
|
||||
@@ -28,8 +28,6 @@ export class FilterMenuButtonComponent {
|
||||
|
||||
#filter = inject(FilterService);
|
||||
|
||||
isIconButtonActive = computed(() => !this.#filter.isDefaultFilter());
|
||||
|
||||
selectedFilters = this.#filter.selectedFilterCount;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user