Selectmenu: update button text when selected option is added

This commit is contained in:
Felix Nagel
2013-08-31 03:09:57 +02:00
parent 24c293215c
commit 67f04e4e42

View File

@@ -179,6 +179,8 @@ $.widget( "ui.selectmenu", {
// Make sure menu is selected item aware
this.menu.menu( "focus", null, item );
this._setAria( item.data( "ui-selectmenu-item" ) );
this._setText( this.buttonText, item.text() );
// Set disabled state
this._setOption( "disabled", !!this.element.prop( "disabled" ) );