Skip to content

Commit

Permalink
Update selected item on host property change
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-fix committed Jun 27, 2018
1 parent 6c78619 commit bc9dc2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vaadin-dropdown-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,15 @@
const template = this.querySelector('template');
this._overlayElement.template = template;
if (this._overlayElement.content) {
const origForwardHostProp = this._overlayElement._instance && this._overlayElement._instance.forwardHostProp;

this._overlayElement._instance.forwardHostProp = (...args) => {
origForwardHostProp.apply(this._overlayElement._instance, args);
setTimeout(() => {
this._updateValueSlot();
});
};

this._menuElement = Array.from(this._overlayElement.content.children).filter(element => element.localName !== 'style')[0];

if (this._menuElement) {
Expand Down

0 comments on commit bc9dc2c

Please sign in to comment.