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:
Nino Righi
2025-11-07 15:03:41 +00:00
committed by Lorenz Hilpert
parent 731df8414d
commit 11e2aaff8d
5 changed files with 9 additions and 5 deletions

View File

@@ -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;

View File

@@ -8,7 +8,7 @@
#trigger="cdkOverlayOrigin"
(click)="toggle()"
type="button"
[class.active]="isIconButtonActive()"
[class.active]="!!selected"
data-what="filter-button"
>
@if (selected > 0) {

View File

@@ -28,8 +28,6 @@ export class FilterMenuButtonComponent {
#filter = inject(FilterService);
isIconButtonActive = computed(() => !this.#filter.isDefaultFilter());
selectedFilters = this.#filter.selectedFilterCount;
/**