Skip to content

Commit 50d7a96

Browse files
committed
Selectmenu: improve _setOption to make it possible to change icons option after init
1 parent 8462194 commit 50d7a96

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ui/jquery.ui.selectmenu.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,12 @@ $.widget( "ui.selectmenu", {
382382
},
383383

384384
_setOption: function( key, value ) {
385+
if ( key === "icons" ) {
386+
this.button.find( "span.ui-icon" )
387+
.removeClass( this.options.icons.button )
388+
.addClass( value.button );
389+
}
390+
385391
this._super( key, value );
386392

387393
if ( key === "appendTo" ) {

0 commit comments

Comments
 (0)