From 11f5cd67fbec794e0fee7f186ad5a247680c93a7 Mon Sep 17 00:00:00 2001 From: Marcus Notheis Date: Tue, 14 May 2024 22:15:43 +0200 Subject: [PATCH] docs: more detailed explanation of opener attribute (#8953) --- packages/main/src/ColorPalettePopover.ts | 2 ++ packages/main/src/Menu.ts | 4 +++- packages/main/src/Popover.ts | 4 +++- packages/main/src/Select.ts | 2 ++ packages/main/src/Tokenizer.ts | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/main/src/ColorPalettePopover.ts b/packages/main/src/ColorPalettePopover.ts index 7e32a63c5c0e..175c66515aed 100644 --- a/packages/main/src/ColorPalettePopover.ts +++ b/packages/main/src/ColorPalettePopover.ts @@ -134,6 +134,8 @@ class ColorPalettePopover extends UI5Element { /** * Defines the ID or DOM Reference of the element that the popover is shown at. + * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover. + * You can only set the `opener` attribute to a DOM Reference when using JavaScript. * @public * @default undefined * @since 1.21.0 diff --git a/packages/main/src/Menu.ts b/packages/main/src/Menu.ts index e00f295418f7..5f6b39cc8a79 100644 --- a/packages/main/src/Menu.ts +++ b/packages/main/src/Menu.ts @@ -253,7 +253,9 @@ class Menu extends UI5Element { loadingDelay!: number; /** - * Defines the ID or DOM Reference of the element that the menu is shown at + * Defines the ID or DOM Reference of the element at which the menu is shown. + * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover. + * You can only set the `opener` attribute to a DOM Reference when using JavaScript. * @public * @default "" * @since 1.10.0 diff --git a/packages/main/src/Popover.ts b/packages/main/src/Popover.ts index 70d77356c994..7336355cac18 100644 --- a/packages/main/src/Popover.ts +++ b/packages/main/src/Popover.ts @@ -222,7 +222,9 @@ class Popover extends Popup { } /** - * Defines the ID or DOM Reference of the element that the popover is shown at + * Defines the ID or DOM Reference of the element at which the popover is shown. + * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover. + * You can only set the `opener` attribute to a DOM Reference when using JavaScript. * @public * @default undefined * @since 1.2.0 diff --git a/packages/main/src/Select.ts b/packages/main/src/Select.ts index 7d01fe6f52ff..669f8db16e42 100644 --- a/packages/main/src/Select.ts +++ b/packages/main/src/Select.ts @@ -207,6 +207,8 @@ class Select extends UI5Element implements IFormInputElement { /** * Defines a reference (ID or DOM element) of component's menu of options * as alternative to define the select's dropdown. + * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the menu. + * You can only set the `opener` attribute to a DOM Reference when using JavaScript. * * **Note:** Usage of `ui5-select-menu` is recommended. * @default undefined diff --git a/packages/main/src/Tokenizer.ts b/packages/main/src/Tokenizer.ts index 6cac10cdf59f..4d4bb67f1e89 100644 --- a/packages/main/src/Tokenizer.ts +++ b/packages/main/src/Tokenizer.ts @@ -257,6 +257,8 @@ class Tokenizer extends UI5Element { /** * Defines the ID or DOM Reference of the element that the menu is shown at + * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the tokenizer. + * You can only set the `opener` attribute to a DOM Reference when using JavaScript. * **Note:** Used inside MultiInput and MultiComboBox components. * @private * @default ""