Skip to content

Commit 8df25ae

Browse files
authored
refactor(ui5-multi-combobox): add unique parts to tokens (#1203)
add unique part attributes for each token, so the user can style them, each token would have part="token-{index}", the index of the item within the ui5-multi-combobox the token refers to. * fix public docs
1 parent d8d4fdb commit 8df25ae

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/Public Module Imports.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ For API documentation and samples, please check the [UI5 Web Components Playgrou
3939
| List - Custom Item | `ui5-li-custom` | `import "@ui5/webcomponents/dist/CustomListItem.js";` |
4040
| List - Group Header Item | `ui5-li-groupheader` | `import "@ui5/webcomponents/dist/GroupHeaderListItem.js";` |
4141
| Message Strip | `ui5-messagestrip` | `import "@ui5/webcomponents/dist/MessageStrip.js";` |
42-
| Multi Combo Box | `ui5-multicombobox` | `import "@ui5/webcomponents/dist/MultiComboBox.js";` |
42+
| Multi Combo Box | `ui5-multi-combobox` | `import "@ui5/webcomponents/dist/MultiComboBox.js";` |
4343
| Panel | `ui5-panel` | `import "@ui5/webcomponents/dist/Panel.js";` |
4444
| Popover | `ui5-popover` | `import "@ui5/webcomponents/dist/Popover.js";` |
4545
| Radio Button | `ui5-radiobutton` | `import "@ui5/webcomponents/dist/RadioButton.js";` |

packages/main/src/MultiComboBox.hbs

+8-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@
2323
>
2424
{{#each items}}
2525
{{#if this.selected}}
26-
<ui5-token ?readonly="{{../readonly}}" class="ui5-multi-combobox-token" data-ui5-id="{{this._id}}" >{{this.textContent}}</ui5-token>
26+
<ui5-token
27+
?readonly="{{../readonly}}"
28+
class="ui5-multi-combobox-token"
29+
data-ui5-id="{{this._id}}"
30+
part="token-{{@index}}"
31+
>
32+
{{this.textContent}}
33+
</ui5-token>
2734
{{/if}}
2835
{{/each}}
2936
</ui5-tokenizer>

0 commit comments

Comments
 (0)