Skip to content

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

Open
Vonahz wants to merge 13 commits into
mainfrom
combobox_custom_items
Open

feat(ui5-comobobox, ui5-multi-combobox): add custom items#13640
Vonahz wants to merge 13 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
/**
* @class
* The `ui5-cb-item-custom` is type of combobox item,
* that can be used to place combobox items with custom content in the combobox.

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.

"that can be used to place custom content in the combobox item.
The text property is used for filtering and auto-complete."

<>
<CheckBox
disabled={this._readonly}
checked={this.selected}

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.

The "selected" property is deprecated. We should probably decide based on whether the current item value is among the selectedValues collection

* Defines the selected state of the component.
* @default false
* @public
* @deprecated Set the `value` property on items and use the `selectedValues` property on the parent `ui5-multi-combobox` instead for programmatic selection.

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 not introduce deprecated property. The selected property is kept for compatibility reasons in the ComboBoxItem but in the new classes we should not use it

tag: "ui5-mcb-item-custom",
template: MultiComboBoxItemCustomTemplate,
styles: [ComboBoxItemCustom.styles, styles],
dependencies: [...ComboBoxItemCustom.dependencies, CheckBox],

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.

We don't need the dependencies declaration for the JSX renderer. It was used for the old handlebars templates

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

3 participants