-
Notifications
You must be signed in to change notification settings - Fork 0
Description
There's an interesting feature in the jQuery typehead feature where it uses local storage to cache options.
MuchSelect could do something like that. The API could be tricky though.
We could have an attribute that enabled caching, it could specify a key. But should the cache just "live forever" unless something from the outside updated it? This feature might enabled different instance of much-select to "share" an options cache (in local storage).
There's a related feature where much-select could handle fetching options from a API as well.
<much-select> could just emit events about it's cache. Something like a cache-available event that would include if a cache for the options was available and how stale it is.
Options might need to include in their model where they came from, so they could be updated intelligently.
There might need to be some features around "refreshing" the options (from the server). Maybe a slot for the "refresh" button.