Closed seredniy closed 1 month ago
instance.config.choices
is the original choices passed in via the choices
config option when using a <select>
element.
If you want the current choices then instance._store.choices
will work in v10.2.0 and v11.0.x, otherwise _presetChoices
is the one gathered from the backing <select>
element and any config option supplied.
Thanks, @Xon!
I was confused because in v10.2.0
, that config.choices
was always filled, even when choices were not passed via the choices config option.
Anyway, I can safely use _presetChoices
for now?
Yes, that will be populated as expected
Describe the bug Hello!
Thank you for the excellent library and your hard work!
In our code, we used version
10.2.0
of your library. In some of our checks, we accessedinstance.config.choices
to get the list of choices for the current instance.We recently upgraded to version 11.0.2, and now
instance.config.choices
appears empty.Currently, we are temporarily using
instance._presetChoices
, but I'm not sure if this is a proper and correct replacement. What exactly changed, and how should we handle this now? Thank you!P.S. I tested it on your demo and external JSFiddle also.
To Reproduce Steps to reproduce the behavior:
config.choices
Choices version and bundle
Desktop (please complete the following information):