-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS erros are thrown when using bootstrap select on js-generated select #2236
Comments
Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case (you can use our preconfigured Plunker), and report back with:
|
At the very least it'd be helpful if you told what version of bootstrap-select you're using. The stack traces don't do me much good if I don't know which file to look at. |
The versions are: Sorry for not creating a test case, but I do not have much time right now. |
How are you detecting changes to Select A? Native |
The changes are detected by calling |
Can you try the latest (unreleased version) and tell me if the issue persists? https://raw.githack.com/snapappointments/bootstrap-select/v1.13.0-dev/js/bootstrap-select.js |
I will to that (hopefully) today and get back to you. |
@caseyjhol sorry for the delay. The issue is fixed in those files. |
It looks like the source of the 2nd issue was actually caused by a non-namespaced change event associated with the select element. After I was never able to reproduce the first issue (on a single, standard select), but it looks like it's been fixed after a refactor of the code. Hopefully the refactor actually resolved the issue and didn't just bury it. If you ever get a chance to get me a demo of the first issue (a select with only a single option) using v1.13.7, I'd appreciate it. |
I've encountered the first issue when I was trying to implement a quick insert via ajax call when no records were found by the live search. I added a custom message to the Here is a jsfiddle which produces pretty much the same error. Guess I don't need to specify the versions of the resources as you can see them on the fiddle itself. |
Released in v1.13.9! @dimegalev Thanks for the fiddle. Your specific issue is occurring because there is a click listener on link elements inside the menu. It's expecting any link that's clicked to be related to an available option in the menu. It's such a fringe case, I'm not sure I can do anything about that for now (you could use a |
I have a piece of code with two selects A and B.
Select B have
<option>
elements generated (based on async data requested from the server) when the value of select A is being changed.I can see two kind of errors thrown in the console, when I'm clicking on option from select B:
I'm not sure if I will be able to create a code snippet to reproduce it, but let me know if the stack traces are not enough.
The text was updated successfully, but these errors were encountered: