-
Notifications
You must be signed in to change notification settings - Fork 291
Added iconField #221
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
base: master
Are you sure you want to change the base?
Added iconField #221
Conversation
| export class ListItem { | ||
| id: String | number; | ||
| text: String | number; | ||
| icon: String; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need to be an optional parameter as not everyone would use an icon.
| <li *ngFor="let item of _data | multiSelectFilter:filter; let i = index;" (click)="onItemClick($event,item)" class="multiselect-item-checkbox"> | ||
| <input type="checkbox" aria-label="multiselect-item" [checked]="isSelected(item)" [disabled]="disabled || (isLimitSelectionReached() && !isSelected(item)) || item.isDisabled" /> | ||
| <div>{{item.text}}</div> | ||
| <div><i class="{{item.icon}}"></i> {{item.text}}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything related to icons would need to be tested first. You have modified the code as if 100% of users would consume this property. It would be an optional property.
<i *ngIf="item?.icon" class="{{item.icon}}">
| ]; | ||
| this.selectedItems = [ | ||
| { item_id: 4, item_text: 'Pune', item_icon: 'fa fa-truck' }, | ||
| { item_id: 6, item_text: 'Navsari', item_icon: 'fa fa-wifi' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing code should be unbothered. This would need to be refactored to not touch existing code.
Please accepts my pull request to added iconField.
Fixed for issue: #215