Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How add checked/unchecked All with custom template? #637

Open
ivanferrer opened this issue Jan 9, 2023 · 0 comments
Open

How add checked/unchecked All with custom template? #637

ivanferrer opened this issue Jan 9, 2023 · 0 comments

Comments

@ivanferrer
Copy link

ivanferrer commented Jan 9, 2023

I noticed that param enableCheckAll:true, when customizing the layout the checkall does not appear. How to make it appear, in this case?

<angular2-multiselect [data]="dataSource" [(ngModel)]="dataSourceSelected" 
   (onOpen)="onOpen(dataSource, $event)" 
   (onClose)="onClose(dataSource, $event)" 
   (onDeSelectAll)="onDeSelectAll($event)" 
   (onDeSelect)="onDeSelect($event)" 
   (onDropDownClose)="onDropDownClose($event)" 
   (onFilterChange)="onFilterChange($event)" 
   (onSelectAll)="onSelectAll($event)" 
   (onItemSelect)="onItemSelect($event)" 
   [settings]="dropdownSettings">
   <c-clear>...???...</c-clear> <! --how custom layout to selectAll / deselectAll here... -->
     <c-badge>
       <ng-template let-item="item">
         <!-- selected --> 
         <span><strong>{{label}}</strong></span>
         <span class="pl-2 pr-2 photo-selected" *ngIf="hasPhoto">
           <img class="share-photo" width="24" height="24" onError="this.src='/assets/img/participant.jpg'"
           [src]="getPhotoUrl(item?.id) | async" alt="profile">
         </span>
         <span class="selected-text">{{item.name}}</span>
       </ng-template>
   </c-badge>
   <c-item>
     <!-- list -->
         <ng-template let-item="item">
           <div class="d-flex"> 
             <span class="pl-2 pr-2 foto-minor" *ngIf="hasPhoto">
               <img class="share-photo" width="32" height="32" onError="this.src='/assets/img/participant.jpg'"
               [src]="getPhotoUrl(item?.id) | async" alt="profile">
             </span>
             <span>{{item.name}}</span>
         </div>
         </ng-template>
   </c-item>
 </angular2-multiselect>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant