We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Multiselect without key combinations or checkboxes?

Hello,
I am trying to set up the ListBox in the following way:
  • A click on an item selects it
  • It is possible to select multiple items
  • Clicking a selected item deselects it
  • No key combinations should be needed
  • No checkboxes should be used
So pretty much the behavior of the ListBox on mobile.

Is this possible with the ListBox component? If so, what would be the best way to achieve this goal?

3 Replies

AD Arunkumar Devendiran Syncfusion Team February 4, 2020 02:22 PM UTC

Hi Hans Benny, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your reported query and achieved that by using property binding in change event. Please refer the below sample link, 
 
Sample link: 
 
Could you please check the above sample and get back to us with more information if we misunderstood your requirement or need further assistance.  
 
Regards, 
Arunkumar D 



HB Hans Benny February 5, 2020 03:16 PM UTC

Hello Arunkumar,
thanks a lot! This is what I needed. There is just one problem. Take a look at this: https://stackblitz.com/edit/fhh3ni-7vgi7c?file=index.ts.

If you disable the ripple, you can clearly see already selected items "flash" for a second when you select more items, because the .e-selected class is reset on every element when the selection changes. Any way to fix this behavior?


AD Arunkumar Devendiran Syncfusion Team February 6, 2020 04:36 PM UTC

Hi Hans Benny, 
 
Good day to you. 
 
We have checked your reported issue and it can be achieved that by using dataBind() method. We have created the sample for your reference. Please refer the below sample link, 
 
Sample Link: 
 
Regards, 
Arunkumar D 


Loader.
Live Chat Icon For mobile
Up arrow icon