Skip to content
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

Fail to update options when they are not strings #99

Open
MatteoPiovanelli-Laser opened this issue Jul 3, 2020 · 0 comments
Open

Fail to update options when they are not strings #99

MatteoPiovanelli-Laser opened this issue Jul 3, 2020 · 0 comments

Comments

@MatteoPiovanelli-Laser
Copy link

$dropdown.prev('select').val($option.data('value')).trigger('change');

When the library should update the option for the original selected, it fails to do so if the value is interpreted by js as something other than a string.

For example with the following select.

<select id="id" name="name" class="nice-select" /">
                        <option value="true">Yes</option>
                        <option value="false">No</option>
                    </select>
MatteoPiovanelli-Laser added a commit to MatteoPiovanelli-Laser/jquery-nice-select that referenced this issue Jul 3, 2020
Fix for hernansartorio#99 
By converting the value to string, the select option can be set correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant