Skip to content

chore(ui5-toolbar-select): value and label added #11972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

PetyaMarkovaBogdanova
Copy link
Contributor

@PetyaMarkovaBogdanova PetyaMarkovaBogdanova commented Jul 22, 2025

Fixes: 11706
This pull request introduces enhancements to the ToolbarSelect component, focusing on improved functionality for handling custom labels and values. Below is a summary of the most important changes:

Enhancements to ToolbarSelect Functionality:

  • Support for Custom Labels:
    • Added a new label slot to allow custom HTML elements to be displayed as part of the component's input section. This enables dynamic customization of the label displayed alongside the select dropdown.
  • Value Property Integration:
    • Added a new value property to correspond to the ui5-select 'value' prop. It is passed to the Select element in the wrapper component's template.

@PetyaMarkovaBogdanova PetyaMarkovaBogdanova marked this pull request as ready for review August 4, 2025 13:26
@dobrinyonkov
Copy link
Contributor

dobrinyonkov commented Aug 5, 2025

Looking good, just a few stuff:

1) changing the selected option isn't updating the value property of the ui5-toolbar-select

  • open ToolbarSelect.html
  • change the selected option
  • see the toolbarSelect.value property is returning old values

we may need to create a getter that returns the value property from the internal select
e.g

/**
 * Defines the value of the component:
 *
 * @public
 * @default ""
 * @since 2.13.0
 */
@property()
set value(newValue: string) {
	if (this.select) {
		this.select.value = newValue;
	}
}

get value() {
	return this.select ? this.select.value : "";
}

get select(): Select | null {
	return this.shadowRoot!.querySelector<Select>("[ui5-select]");
}

2) let's also create a new snippet in the ToolbarSelect.html

3) looks like we don't yet need individualSlots on the options slot 

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]: ui5-toolbar-select "value" property and "label" slot enablement
2 participants