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

[Dropdown] item data value is cleared when dropdown message is shown #3622

Closed
mdehoog opened this issue Jan 29, 2016 · 1 comment
Closed

Comments

@mdehoog
Copy link
Contributor

mdehoog commented Jan 29, 2016

When creating a searchable dropdown from existing HTML, the dropdown item's value property in the element data is cleared when searching and no results are available. This is because, when the "No results" message is shown, the menuObserver mutation observer is fired which calls module.refresh(), which in turn calls module.refreshData() which removes the value and text data values from the item elements.

Here is a jsbin that reproduces the issue: http://jsbin.com/runetopasi/edit?html,js,output

Here is the code that removes the value and text data from the items:

$item
.removeData(metadata.text)
.removeData(metadata.value)
. Could you please explain the reason behind this code? Otherwise, simply removing these lines will fix this issue.

@jlukic
Copy link
Member

jlukic commented May 15, 2016

See #3879 for response

@jlukic jlukic closed this as completed May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants