Angular 4 Multiselect listBox bug

Posted by: umesh.vishwakarma on 24 October 2017, 7:39 pm EST

    • Post Options:
    • Link

    Posted 24 October 2017, 7:39 pm EST

    Hi Guys,

    I found a strange issue while using multi-select combobox, when we use two wj-multi-select on the same page with same data and select some data using checkbox it gets selected properly. However, when I open the second multi-select, I see the listbox already have those checkboxes selected.

    Is this a bug, or am I doing it incorrectly? Looks like although two separate instances of wj-multi-select gets created on the same page, but the Listbox is using the same instance and populating the data.

    I am using version 5.20172.328.

    Thanks,

    Umesh

  • Posted 25 October 2017, 10:21 pm EST

    Hi Umesh,

    Since itemsSource is same for both controls, the changes made by one controls will reflect in second control.

    If you set checkedMemberPath property to different object property, both controls items will be checked differently.

    ~Manish

  • Posted 27 October 2017, 1:21 am EST

    Thanks Manish, wanted to confirm if this is achievable with the same property name, but looks like that’s not the case.

  • Posted 27 October 2017, 4:06 pm EST

    Hi Umesh,

    This issue requires further investigation. Hence, this issue has been escalated to the concerned team with tracking id 294145.

    We will let you know as soon as we get any update on this.

    ~Manish

  • Posted 29 October 2017, 5:21 pm EST

    Thanks Manish, for taking the issue into account.

  • Posted 7 November 2017, 12:19 am EST

    Hello guys

    I am not sure I understand the question, but let me try to answer it anyway :wink:

    If multiple Wijmo controls are bound to the same CollectionView, then they stay in sync. Any changes you make to any one of them, including selection and CRUD operations, are reflected on all others.

    So the answer is yes, if you bind several MultiSelect controls to the same CollectionView, then checking items in one of them will check the items on all of them. Here’s an example to demonstrate:

    http://jsfiddle.net/Wijmo5/nzw38gdx/
    

    If that is not what you want, then you should either:

    1. Use different properties to indicate the checked item for each control, e.g. ms1.checkedMemberPath = ‘active’, ms2.checkedMemberPath = ‘subscribed’, etc.

    or…

    1. Create copies of the data and bind each control to a different copy so they don’t interfere with each other.

    I hope this helps.

  • Posted 15 November 2017, 7:38 pm EST

    Thanks @bernardo-castilho, for your valuable comment. Indeed the issue was with assigning the same object to multiple wj-multi-select. We were able to figure out the issue and fixed it earlier, but this will be really helpful for others who are struggling with similar scenarios.

    Thanks,

    Umesh

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels