-
Notifications
You must be signed in to change notification settings - Fork 315
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
setValue for select doesn't work as expected #444
Comments
I also got the same error when using |
I had the same problem today and digged a little deeper in the code. I found the following. When using the API to Looking at my own code, I had the following
As you can see, there is no element with a
That's it. Well, at least for me. It is good to note that the Hope that helps out! |
@seho-nl Yes, you are absolutely right, the element with the |
It seems like the issue with setting the value of your select element ( Issue Summary
SolutionTo fix this, modify your HSSelect configuration to include a Example CodeUpdate your select element with a
ExplanationThe Additional
|
I found another bug, you can not use setValue when tags mode is enabled. The setValue function triggers that code:
But the toggleTextWrapper is only created in buildToggle function and buildToggle is only triggered when not using tags: |
Not sure if I should open a new issue but it seems that calling And one last thing - adding the posibility to use |
Hey everyone, the issue has been addressed in the latest v2.6.0 release. Thanks! |
Summary
when trying to set the value of an existing select, it throw a javascript console error
Steps to Reproduce
Demo Link
https://preline.co/plugins/html/advanced-select.html
Expected Behavior
setValue is expected to set the value of the select
Actual Behavior
setValue trigger an error
In the console.log, I see in the instance I displayed that the value property has changed to the new value, but nothing happen on the page.
For your information, trying the close() method or open() method work perfectly, only setValue is faulty !
Screenshots
The text was updated successfully, but these errors were encountered: