vnPopover bugfix

This commit is contained in:
Juan 2018-03-20 11:28:41 +01:00
parent c866d28367
commit ffe216f630
1 changed files with 11 additions and 4 deletions

View File

@ -32,14 +32,21 @@ export default class Popover extends Component {
this.content = this.element.querySelector('.content');
}
set child(value) {
this.content.appendChild(value);
}
/**
* @type {HTMLElement} The popover child.
*/
get child() {
return this.content.firstChild;
}
set child(value) {
this.content.innerHTML = '';
this.content.appendChild(value);
}
/**
* @type {Boolean} Wether to show or hide the popover.
*/
get shown() {
return this._shown;
}