Filter a MultiSelectListBox without loose the selection

Hi, i’m building a component that permit to select some items from a MultiSelectListBox, i also need to filter the list of items without loose the selection.

How is possible to filter the list without rebuild the list items ?

See the attachment

Thanks
18439434.png

any help ?

Hi Giovanni,

I would recommend you not to use this component, because it’s designed for very special purposes (which are not that useful in real situations I think), but you can check this topic here - https://vaadin.com/forum/thread/18316968/multiselectlistbox-all-items-get-deselected-after-a-filter-is-added-to-the. I found a workaround for that problem, but if you read further it’s kind of unusable with a bit more items (since it doesn’t have a lazy loading neither on the client side nor on the server side) and since you need filtering maybe you’re not showing 10 items. I hope the information helps :).

Best regards,

Gero

Hi Gero,

Thanks for your reply,

The maximum number of item should be about 50, ok if it is not lazy loading.

I’ll try your link suggestion.

Is there another suggested component ?

Thanks

Hi Giovanni,

Then in that case I think it should be fine to use the MultiSelectListBox.
I’m currently using a normal grid with a bit of styling and works great.

Best regards,

Gero