Closed ghost closed 1 year ago
do you want to fix the examples?
I only mentioned the examples, because it's the same behavior as in my application.
As you can see below, I added[toggleAllCheckboxChecked]="allSelectedChecked.locations"
to my ngx-mat-select-search.
For test purposes I added (focus)="onFocusFilter()"
to my mat-select with a console.log('----- onFocusFilter() this.allSelectedChecked', this.allSelectedChecked['locations']);
Even if this.allSelectedChecked['locations'] is false, the all checkbox is checked.
<mat-select multiple (focus)="onFocusFilter()" [ngModel]="inputFields?.locations" (ngModelChange)="inputFields.locations = $event; filtersChanged()">
<mat-option>
<ngx-mat-select-search [showToggleAllCheckbox]="true" (toggleAll)="toggleAllSelection($event, 'locations'); filtersChanged()"
[toggleAllCheckboxChecked]="allSelectedChecked.locations"
[toggleAllCheckboxTooltipMessage]="translations?.selectUnselectAll" [toogleAllCheckboxTooltipPosition]="'above'"
[alwaysRestoreSelectedOptionsMulti]="true" [formControl]="locationFilterCtrl"
placeholderLabel="{{ translations?.search }}" noEntriesFoundLabel="{{ translations?.noResultsFound }}">
<mat-icon ngxMatSelectSearchClear>clear</mat-icon>
</ngx-mat-select-search>
</mat-option>
<mat-option *ngFor="let location of filterOptionsFiltered?.locations"
[value]="location?.id">
{{ location?.name }}
</mat-option>
</mat-select>
@macjohnny can you mark this issue for hacktoberfest
? Thanks
@AhsanAyaz I added the topic "hacktoberfest" to this repo, this should be enough, right?
@macjohnny , yeah I believe so! And thanks 🙂
Describe the bug Checkbox "Select all / unselect all" is checked even if not all list elements are checked
To Reproduce https://stackblitz.com/github/bithost-gmbh/ngx-mat-select-search-example
Expected behavior Checkbox "Select all / unselect all" shouldn't be checked
Screenshots
Desktop (please complete the following information): OS: Windows 10 Browser Google Chrome Version 92.0.4515.159
Smartphone (please complete the following information):
Additional context