Cannot use setChoices, Please Help!
See original GitHub issueDescribe the bug
When using select-multiple (or all, I haven’t tested others), calling setChoices will result in a TypeError (Cannot read property ‘removeLoadingState’ of undefined). It looks like the setChoices is trying to access containerOuter, but it cannot for whatever reason. The Choices that are passed to the method make no difference, neither do the value and label values, nor the replaceData option.
I would give you code examples, but there is no code that doesn’t result in this error, so it would be mostly useless.
This is concise because I fully believe I am doing something wrong. I have tried various versions of Choices.js but only 7.1.5 works, and that is simply too old. I have tried so many things to get it to work with zero luck that I felt like I should open an issue. I really hope I just overlooked something! Maybe someone else might also run into this issue at some point…
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5
Top Related StackOverflow Question
Make sure you’re not calling
new Choiceson the same element multiple times. This was causing this error for me, e.g.How do you get initialized instances?