Merge pull request 'Repaint buttons' (#453) from fix/bugfix into release/v9.0.0

This commit is contained in:
Julia Radzhabova
2025-05-29 13:54:46 +00:00

View File

@ -643,6 +643,8 @@ define([
var ariaLabel = me.options.ariaLabel ? me.options.ariaLabel : ((typeof me.options.hint == 'string') ? me.options.hint : me.options.hint[0]);
$btn.attr('aria-label', ariaLabel);
}
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
}
me.rendered = true;
@ -1035,6 +1037,13 @@ define([
if (!this.disabled) {
this.split ? this.cmpEl.attr('tabindex', this.tabindex) : this.$el && this.$el.find('button').addBack().filter('button').attr('tabindex', this.tabindex);
}
},
onThemeChanged: function() {
if (this.options.width>0 && this.rendered) {
var el = this.cmpEl;
el && el.hasClass('btn-group') && el.hasClass('split') && $('button:first', el).css('width', this.options.width - $('[data-toggle^=dropdown]', el).outerWidth());
}
}
});