question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

singleSelection: true; prevents use of <c-badge>

See original GitHub issue

I’ve noticed that setting the option singleSelection: true somehow prevents the use of <c-badge> on selected item.

When I remove the option (or set it to false) it works as intended (but I do need the option to only select one.

The code in question:

<angular2-multiselect
    [data]='package.statuses'
    [(ngModel)]='package.selectedStatuses'
    [settings]='{ singleSelection: true, canenableCheckAll: false, classes: "pp-multiselect-radio pp-multiselect", enableSearchFilter: true }'
    (onSelect)="changeStatus(package)"
    (onDeSelect)="changeStatus(package)"
    (onSelectAll)="changeStatus(package)"
    (onDeSelectAll)="changeStatus(package)">

    <c-item>
        <ng-template let-item="item">
            <span class="status-item">
               <img class="status-icon" popper="{{item.name}}" src="/assets/icons/packageStatus/{{item.code}}.svg" />
                <span class="status-desc">{{item.name}}</span>
            </span>
         </ng-template>
    </c-item>

    <c-badge>
        <ng-template let-item="item">
         <span class="status-item">
         <img class="status-icon" popper="{{item.name}}" src="/assets/icons/packageStatus/{{item.code}}.svg" />
         <span class="status-desc">{{item.name}}</span>
         </span>
        </ng-template>
    </c-badge>
</angular2-multiselect>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
CuppaLabscommented, Sep 7, 2018

fixed. Fix available in v2.10.2

0reactions
coder-strangecommented, Jul 7, 2018

Untill they solve it, <c-badge *ngIf=“!dropdownSettings.singleSelection”> could be a solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular2-multiselect-dropdown badgeShowLimit option not ...
I'm trying to templating selected items in angular2-multiselect-dropdown component, but when I set the badgeShowLimit to, for example, ...
Read more >
ChipGroup | Android Developers
A ChipGroup is used to hold multiple Chip s. ... If the chip group is in the single selection mode and there is...
Read more >
Class: SingleSelect - Salient Process
The Single Select control is used to create a dropdown list of items that can be populated statically or retrieved through a service....
Read more >
Select | Quasar Framework
In case you are looking for a dropdown “button” instead of “input” use Button ... If set to true then a change in...
Read more >
Prevent default action in Blazor DataGrid Component
Learn here all about preventing the default DataGrid action in Syncfusion Blazor DataGrid ... <GridEditSettings AllowAdding="true" AllowEditing="true" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found