NileshPatel17 / ng-multiselect-dropdown

Multiple Select Dropdown Component
https://nileshpatel17.github.io/ng-multiselect-dropdown/
323 stars 287 forks source link

when search select all checkbox is select. #417

Open Thamaraisevan opened 9 months ago

Thamaraisevan commented 9 months ago

Angular version:11

ng-multiselect-dropdown version:0.2.10

Description of issue:When no data is found during a search, the 'Select All' checkbox is selected by default. How can I restrict this behavior in the scenario where no data is found?

Steps to reproduce:

Expected result:When no data is found during a search, the 'Select All' checkbox remains unselected.

Actual result:When no data is found during a search, the 'Select All' checkbox is selected by default. How can I restrict this behavior in the scenario where no data is found?

Demo: Please share sample code link using StackBlitz or codesandbox

Any relevant code:

                    formControlName="userMultiselct" [data]="chatUsersList" [settings]="dropdownSettings"
                    [noDataLabel]="'No results matched your search!'" 
                    (onSelect)="onuserSelect($event)" (onDeSelect)="onuserDeSelect($event)" (onFilterChange)="onFilterChangeUser($event)"
                    (onSelectAll)="onSelectAllUsers($event)" (onDeSelectAll)="onUnSelectAllUsers()">
                  </ng-multiselect-dropdown>    dropdownSettings: any = {
    singleSelection: false,
    idField: 'user_id',
    textField: 'name',
    // textField: 'project_name',
    unSelectAllText: 'UnSelect All',
    enableSearchFilter: true,
    itemsShowLimit: 3,
    allowSearchFilter: true,
    noDataAvailablePlaceholderText: "No results matched your search!",
    allowRemoteDataSearch: false,
    selectAllText: 'Select All',
    clearSearchFilter: false,
    closeDropDownOnSelection:true,

  }