Skip to content

feat(ui5-comobobox, ui5-multi-combobox): add custom items#13640

Open
Vonahz wants to merge 19 commits into
mainfrom
combobox_custom_items
Open

feat(ui5-comobobox, ui5-multi-combobox): add custom items#13640
Vonahz wants to merge 19 commits into
mainfrom
combobox_custom_items

Conversation

@Vonahz

@Vonahz Vonahz commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

JIRA: BGSOFUIRILA-4141

Fixes: #11731

Introduces ui5-cbi-custom and ui5-mcbi-custom to enable custom content in ComboBox and MultiComboBox items.

@Vonahz Vonahz temporarily deployed to netlify-preview June 4, 2026 08:22 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Sample sync reminder

HTML sample changed but React sample (sample.tsx) not updated:

  • main/ComboBox/CustomItems
  • main/MultiComboBox/CustomItems

Please keep both samples in sync, or ignore if the change does not apply to both.

@sap-ui5-webcomponents-release

sap-ui5-webcomponents-release Bot commented Jun 4, 2026

Copy link
Copy Markdown

@Vonahz Vonahz temporarily deployed to netlify-preview June 4, 2026 09:00 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 4, 2026 10:05 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 4, 2026 10:10 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 4, 2026 10:51 — with GitHub Actions Inactive
@Vonahz Vonahz requested a review from aleksandar-terziev June 4, 2026 11:01
@Vonahz Vonahz temporarily deployed to netlify-preview June 9, 2026 15:28 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 9, 2026 15:40 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 9, 2026 17:10 — with GitHub Actions Inactive
@Vonahz Vonahz requested review from nikoletavnv and nnaydenow June 10, 2026 10:53
Comment thread packages/main/src/MultiComboBoxItemCustom.ts Outdated
* Used for filtering, autocomplete, and mobile rendering.
* @default undefined
* @public
*/

@nnaydenow nnaydenow Jun 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need that? is it going to be used for the token and as a value in the input?

@Vonahz Vonahz Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It is used for the token and if value is not provided, input value fallbacks to the "text" property.

@Vonahz Vonahz temporarily deployed to netlify-preview June 11, 2026 13:46 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 11, 2026 13:55 — with GitHub Actions Inactive
Comment thread packages/main/src/ComboBoxItemCustom.ts Outdated
Comment thread packages/main/src/MultiComboBoxItemCustomTemplate.tsx
Comment thread packages/main/src/MultiComboBoxItemCustom.ts Outdated
Comment thread packages/main/src/MultiComboBoxItemCustom.ts Outdated
@nikoletavnv

Copy link
Copy Markdown
Contributor

On mobile, the matching item does not have the selected blue state. For standard items and for desktop the item looks selected (blue background) when you start typing and the item is auto-completed, but for the combo-box custom item the selected style is missing on phone.

Screen.Recording.2026-06-15.124844.mp4

@Vonahz Vonahz requested a review from LilyanaOviPe June 15, 2026 12:35
Comment thread packages/website/docs/_samples/main/ComboBox/CustomItems/sample.html Outdated
Comment thread packages/website/docs/_samples/main/MultiComboBox/CustomItems/sample.html Outdated
@Vonahz Vonahz temporarily deployed to netlify-preview June 15, 2026 14:14 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 15, 2026 14:27 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 17, 2026 08:26 — with GitHub Actions Inactive
@Vonahz Vonahz temporarily deployed to netlify-preview June 17, 2026 08:27 — with GitHub Actions Inactive
/**
* @class
* The `ui5-cb-item-custom` is a combobox item component
* that can be used to place custom content in the combobox item.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* that can be used to place custom content in the combobox item.
* that allows placing custom content inside a combobox item.

* @class
* The `ui5-cb-item-custom` is a combobox item component
* that can be used to place custom content in the combobox item.
* The text property is used for filtering and auto-complete.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The text property is used for filtering and auto-complete.
* The `text` property is used for filtering and auto-complete.

* The `ui5-cb-item-custom` is a combobox item component
* that can be used to place custom content in the combobox item.
* The text property is used for filtering and auto-complete.
* In case the user needs highlighting functionality, check "@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* In case the user needs highlighting functionality, check "@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js"
* For highlighting functionality, see `@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js`."


/**
* Defines the value of the component.
* Used for programmatic selection via selectedValue property.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Used for programmatic selection via selectedValue property.
* Used for programmatic selection via the `selectedValue` property.

/**
* @class
* The `ui5-mcb-item-custom` is a multi-combobox item component
* that can be used to place custom content in the multi-combobox item.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* that can be used to place custom content in the multi-combobox item.
* that hat allows placing custom content inside a multi-combobox item.

* @class
* The `ui5-mcb-item-custom` is a multi-combobox item component
* that can be used to place custom content in the multi-combobox item.
* The text property is used for filtering and token display.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The text property is used for filtering and token display.
* The `text` property is used for filtering and token display.

* The `ui5-mcb-item-custom` is a multi-combobox item component
* that can be used to place custom content in the multi-combobox item.
* The text property is used for filtering and token display.
* In case the user needs highlighting functionality, check "@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* In case the user needs highlighting functionality, check "@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js"
* For highlighting functionality, see "@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js"


### Custom Items with Rich Content
Use `ui5-cb-item-custom` to create custom item templates with complex layouts, multiple icons, images, or any HTML content.
This allows you to build rich, visually appealing dropdown items beyond the standard text and additional-text format.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This allows you to build rich, visually appealing dropdown items beyond the standard text and additional-text format.
This allows you to build rich, visually appealing dropdown items beyond the standard text and `additional-text` format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]:Support for slot content in <ui5-cb-item> to enable custom rendering of combobox items

4 participants