File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1076,8 +1076,8 @@ var // currently active contextMenu trigger
1076
1076
1077
1077
// add icons
1078
1078
if ( item . icon ) {
1079
- var icon = ( $ . isFunction ( item . icon ) ) ? item . icon . call ( this , $t , key , item ) : item . icon ;
1080
- $t . addClass ( "icon icon-" + icon ) ;
1079
+ item . _icon = ( $ . isFunction ( item . icon ) ) ? item . icon . call ( this , $t , key , item ) : item . icon ;
1080
+ $t . addClass ( "icon icon-" + item . _icon ) ;
1081
1081
}
1082
1082
}
1083
1083
@@ -1150,6 +1150,11 @@ var // currently active contextMenu trigger
1150
1150
1151
1151
// dis- / enable item
1152
1152
$item [ disabled ? 'addClass' : 'removeClass' ] ( 'disabled' ) ;
1153
+
1154
+ if ( $ . isFunction ( item . icon ) ) {
1155
+ $item . removeClass ( "icon-" + item . _icon ) ;
1156
+ $item . addClass ( "icon-" + item . icon . call ( this , $trigger , key , item ) ) ;
1157
+ }
1153
1158
1154
1159
if ( item . type ) {
1155
1160
// dis- / enable input elements
You can’t perform that action at this time.
0 commit comments