svelte-multiselect
svelte-multiselect copied to clipboard
Add option to persist state across page reloads
Currently MultiSelect returns to its initial state on page reloads. It's not too difficult to manually write the current state to a store which is synced to localStorage
. But perhaps this is a common enough use case that it should get its own prop:
persist: 'localStorage' | 'sessionStorage' | false = false
sessionStorage
persists until the window/tab is closed while localStorage
persists until user or app manually clears the cache.