@@ -79,10 +79,6 @@ return $.widget( "ui.selectmenu", {
79
79
80
80
this . _rendered = false ;
81
81
this . menuItems = $ ( ) ;
82
-
83
- if ( this . options . disabled ) {
84
- this . disable ( ) ;
85
- }
86
82
} ,
87
83
88
84
_drawButton : function ( ) {
@@ -562,25 +558,27 @@ return $.widget( "ui.selectmenu", {
562
558
this . menuWrap . appendTo ( this . _appendTo ( ) ) ;
563
559
}
564
560
565
- if ( key === "disabled" ) {
566
- this . menuInstance . option ( "disabled" , value ) ;
567
- this . button . attr ( "aria-disabled" , value ) ;
568
- this . _toggleClass ( this . button , null , "ui-state-disabled" , value ) ;
569
-
570
- this . element . prop ( "disabled" , value ) ;
571
- if ( value ) {
572
- this . button . attr ( "tabindex" , - 1 ) ;
573
- this . close ( ) ;
574
- } else {
575
- this . button . attr ( "tabindex" , 0 ) ;
576
- }
577
- }
578
-
579
561
if ( key === "width" ) {
580
562
this . _resizeButton ( ) ;
581
563
}
582
564
} ,
583
565
566
+ _setOptionDisabled : function ( value ) {
567
+ this . _super ( value ) ;
568
+
569
+ this . menuInstance . option ( "disabled" , value ) ;
570
+ this . button . attr ( "aria-disabled" , value ) ;
571
+ this . _toggleClass ( this . button , null , "ui-state-disabled" , value ) ;
572
+
573
+ this . element . prop ( "disabled" , value ) ;
574
+ if ( value ) {
575
+ this . button . attr ( "tabindex" , - 1 ) ;
576
+ this . close ( ) ;
577
+ } else {
578
+ this . button . attr ( "tabindex" , 0 ) ;
579
+ }
580
+ } ,
581
+
584
582
_appendTo : function ( ) {
585
583
var element = this . options . appendTo ;
586
584
0 commit comments