ui5-webcomponents
ui5-webcomponents copied to clipboard
refactor(ui5-option): make options physical elements
Removes the ui5-select-menu and ui5-select-menu-option components.
BREAKING CHANGE: The ui5-select-menu and ui5-select-menu-option components are removed. Custom options can now be created using the ui5-option-custom, directly placed inside the default slot of the ui5-select
SelectMenu & SelectMenuOption
| Changed item | Old | New |
|---|---|---|
| SelectMenu | ui5-select-menu |
removed |
| SelectMenuOption | ui5-select-menu-option |
ui5-option-custom |
If you have previously used the ui5-select-menu and ui5-select-menu-option:
<ui5-select menu="selectMenu"></ui5-select>
<ui5-select-menu id="selectMenu">
<ui5-select-menu-option>
<div class="optionContent">custom</div>
</ui5-select-menu-option>
</ui5-select-menu>
Now use just ui5-select and ui5-option-custom instead:
<ui5-select>
<ui5-option-custom>
<div class="optionContent">custom</div>
</ui5-option-custom>
</ui5-select>
Select
| Changed item | Old | New |
|---|---|---|
| property | menu |
removed |
The menu property of the ui5-select is removed.
Option
| Changed item | Old | New |
|---|---|---|
| slot | text |
content |
The ui5-option default slot's accessor text is renamed to content.
If you have previously used it like:
const text = selectOption.text;
Now use the content getter:
const text = selectOption.content;
Related to https://github.com/SAP/ui5-webcomponents/issues/8461, https://github.com/SAP/ui5-webcomponents/issues/7887