You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading options, the rendered output of these options is stored in the renderCache. The renderCache is only invalidated if the value of the option changes.
In our case we provide additional data with the options which we use in a custom option renderer and display this data to the user.
Example: We do a faceted search and return new options which are a subset of the already selected options by the user.
User selects "Tag 1" and we do a new load of options, passing the selected options to the server. The client get's new options into the load callback to render:
[{"value": "Tag 2", "count": 3}]
The user facing options in the dropdown are now "Tag 2 (12)" and not "Tag 2 (3)" as expected, because the value of the option hasn't changed, thus the cached version of the rendered option is used.
This happens even if we call clearOptions() before passing the new items to the load callback, as clearOptions() does not clear the renderCache for options.
closing stale issues older than one year.
If this issue was closed in error please message the maintainers.
All issues must include a proper title, description, and examples.
When loading options, the rendered output of these options is stored in the renderCache. The renderCache is only invalidated if the value of the option changes.
In our case we provide additional data with the options which we use in a custom option renderer and display this data to the user.
Example: We do a faceted search and return new options which are a subset of the already selected options by the user.
The option renderer generates the following HTML:
Initial options:
The user facing options in the dropdown are now:
User selects "Tag 1" and we do a new load of options, passing the selected options to the server. The client get's new options into the load callback to render:
The user facing options in the dropdown are now "Tag 2 (12)" and not "Tag 2 (3)" as expected, because the value of the option hasn't changed, thus the cached version of the rendered option is used.
This happens even if we call clearOptions() before passing the new items to the load callback, as clearOptions() does not clear the renderCache for options.
Workaround for load method:
The text was updated successfully, but these errors were encountered: