-
Notifications
You must be signed in to change notification settings - Fork 279
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
base: main
Are you sure you want to change the base?
Conversation
…nents into add-toolbar-select-apis
…nents into add-toolbar-select-apis
…nents into add-toolbar-select-apis
Looking good, just a few stuff: 1) changing the selected option isn't updating the value property of the ui5-toolbar-select
we may need to create a getter that returns the value property from the internal select /**
* 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 |
…nents into add-toolbar-select-apis
packages/main/src/ToolbarSelect.ts
Outdated
* | ||
* @public | ||
* @default "" | ||
* @since 2.13.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since 2.15.0
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: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 to correspond to the ui5-select 'value' prop. It is passed to theSelect
element in the wrapper component's template.