We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Data binding is broken when the option is selected. It updates values on the list, but not in the selection.
https://jsbin.com/rafumiv/2/edit?html,output
vaadin-dropdown-menu
<vaadin-item>{{item}}</vaadin-item>
<input value="{{item}}">
Value is updated in the dropdown
There is still the old value.
The text was updated successfully, but these errors were encountered:
The reason is: the displayed value is a DOM clone of an actual item from the template instance.
Possible solution: intercept forwardHostProp invocation on the template instance and update the displayed clone.
forwardHostProp
const origForwardHostProp = dropdownMenu._overlayElement._instance.forwardHostProp; dropdownMenu._overlayElement._instance.forwardHostProp = function() { origForwardHostProp.apply(this, arguments); setTimeout(() => dropdownMenu._updateValueSlot()); };
Sorry, something went wrong.
Are you suggesting it as a solution on a user level, or as something to be done by vaadin-dropdown-menu?
If it's a solution for user-land, then it's quite risky to rely on internal (_*) API to hack things around.
_*
Something for the <vaadin-dropdown-menu>, of course.
<vaadin-dropdown-menu>
yuriy-fix
No branches or pull requests
Description
Data binding is broken when the option is selected. It updates values on the list, but not in the selection.
Live Demo
https://jsbin.com/rafumiv/2/edit?html,output
Steps to Reproduce
vaadin-dropdown-menu
, with Polymer's binding (<vaadin-item>{{item}}</vaadin-item>
) inside it,<input value="{{item}}">
),Expected Results
Value is updated in the dropdown
Actual Results
There is still the old value.
Browsers Affected
Versions
The text was updated successfully, but these errors were encountered: