Skip to content

Commit

Permalink
fix(docs): display the ui5-popover API correctly (#1064)
Browse files Browse the repository at this point in the history
FIXES: #1029
  • Loading branch information
ilhan007 committed Dec 16, 2019
1 parent 2b981e2 commit e1b5649
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/main/src/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ import PopoverCss from "./generated/themes/Popover.css.js";

const arrowSize = 8;

/**
* @public
*/
const metadata = {
tag: "ui5-popover",
properties: /** @lends sap.ui.webcomponents.main.Popover.prototype */ {
properties: /** @lends sap.ui.webcomponents.main.Popover.prototype */ {
/**
* Defines the ID of the HTML Element, which will get the initial focus.
*
Expand Down Expand Up @@ -154,7 +157,7 @@ const metadata = {

_maxContentHeight: { type: Integer },
},
slots: {
slots: /** @lends sap.ui.webcomponents.main.Popover.prototype */ {
/**
* Defines the content of the Web Component.
* @type {Node[]}
Expand Down Expand Up @@ -187,7 +190,7 @@ const metadata = {
type: HTMLElement,
},
},
events: {
events: /** @lends sap.ui.webcomponents.main.Popover.prototype */ {
/**
* Fired before the component is opened.
*
Expand Down Expand Up @@ -297,6 +300,11 @@ class Popover extends UI5Element {
return event.target === this._opener;
}

/**
* Opens the popover.
* @param {HTMLElement} opener the element that the popover is opened by
* @public
*/
openBy(opener) {
if (!opener || this.opened) {
return;
Expand All @@ -316,9 +324,7 @@ class Popover extends UI5Element {
}

/**
*
* @param {*} escPressed
* @param {*} preventRegitryUpdate
* Closes the popover.
* @public
*/
close(escPressed = false, preventRegitryUpdate = false) {
Expand Down

0 comments on commit e1b5649

Please sign in to comment.