From 6e4a156a183befd309dffe4d7a91964bbcf177d5 Mon Sep 17 00:00:00 2001 From: Filip Siderov Date: Thu, 17 Dec 2020 11:16:43 +0200 Subject: [PATCH] feat(ui5-mcb-item): implement stable-dom-ref property (#2418) --- packages/main/src/MultiComboBox.js | 6 ++++++ packages/main/src/MultiComboBoxItem.js | 9 +++++++++ packages/main/src/MultiComboBoxPopover.hbs | 9 ++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/main/src/MultiComboBox.js b/packages/main/src/MultiComboBox.js index 91fe5bf6cd75..15c6e0b181fa 100644 --- a/packages/main/src/MultiComboBox.js +++ b/packages/main/src/MultiComboBox.js @@ -338,6 +338,12 @@ const metadata = { *
  • Backspace - deletes the token and focus the next token.
  • * * + * In the context of ui5-multi-combobox, you can provide a custom stable DOM ref for: + * + * *

    ES6 Module Import

    * * import "@ui5/webcomponents/dist/MultiComboBox"; diff --git a/packages/main/src/MultiComboBoxItem.js b/packages/main/src/MultiComboBoxItem.js index 476743aefeee..17ab6497046b 100644 --- a/packages/main/src/MultiComboBoxItem.js +++ b/packages/main/src/MultiComboBoxItem.js @@ -13,6 +13,15 @@ const metadata = { * @public */ selected: { type: Boolean }, + + /** + * Defines the stable selector that you can use via getStableDomRef method. + * @public + * @since 1.0.0-rc.10 + */ + stableDomRef: { + type: String, + }, }, }; diff --git a/packages/main/src/MultiComboBoxPopover.hbs b/packages/main/src/MultiComboBoxPopover.hbs index 2bf91731cdb8..f21132beee62 100644 --- a/packages/main/src/MultiComboBoxPopover.hbs +++ b/packages/main/src/MultiComboBoxPopover.hbs @@ -67,7 +67,14 @@ {{#each _filteredItems}} - {{this.text}} + + {{this.text}} + {{/each}}