Working with Select2 and Local storage

Hi everyone !

This is my first post, i must confess that i’m totally confused about the Select2 component.

I try to have a list of values and some of them are active. When a user select or unselect a value, i would like to save it to local storage.

I made a list of options :
Screenshot 2023-03-14 at 14.48.32

New user so i have to do another post for other images :arrow_down_small:

What i don’t get are all of the options here :
Screenshot 2023-03-14 at 14.49.09

and these

Screenshot 2023-03-14 at 14.49.25

And lastly, how do i trigger a change correctly, and keep the choice of the user across local storage (that i already added to the page of course)

Screenshot 2023-03-14 at 14.49.43

I love Wappler but this component itself is getting me crazy since a couple of days :sweat_smile:

Thank you all !
Edouard

Select2 is not available as a component in Wappler.

Sorry @Teodor, i thought it was Select2 because of this : Screenshot 2023-03-14 at 15.02.42 but it is just “select”

This is a standard HTML5 select element. select2Multiple is the id you’ve given to it.

1 Like

Thanks @Teodor :slight_smile: Do you have a tutorial on how to map the differents options to local storage to achieve this ?

First you need to add the local storage component on the page, define its schema and then on updated dynamic event add the value of the select to the local storage.