UX: adds title attribute to widget dropdown header (#9597)
This commit is contained in:
parent
7ef8f7bb7c
commit
0d84f3afd4
|
@ -56,9 +56,11 @@ export const WidgetDropdownHeaderClass = {
|
|||
tagName: "button",
|
||||
|
||||
transform(attrs) {
|
||||
return {
|
||||
label: attrs.translatedLabel ? attrs.translatedLabel : I18n.t(attrs.label)
|
||||
};
|
||||
return { label: this._buildLabel(attrs) };
|
||||
},
|
||||
|
||||
buildAttributes(attrs) {
|
||||
return { title: this._buildLabel(attrs) };
|
||||
},
|
||||
|
||||
buildClasses(attrs) {
|
||||
|
@ -85,7 +87,11 @@ export const WidgetDropdownHeaderClass = {
|
|||
{{#if attrs.caret}}
|
||||
{{d-icon "caret-down"}}
|
||||
{{/if}}
|
||||
`
|
||||
`,
|
||||
|
||||
_buildLabel(attrs) {
|
||||
return attrs.translatedLabel ? attrs.translatedLabel : I18n.t(attrs.label);
|
||||
}
|
||||
};
|
||||
|
||||
createWidget("widget-dropdown-header", WidgetDropdownHeaderClass);
|
||||
|
|
Loading…
Reference in New Issue