Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit ed10a6e

Browse files
rafaelnerymmalerba
authored andcommitted
fix(mdSelect): Fix theme change dynamically (#10152)
When the theme is changed dynamically, the Option Element would have the previous theme. * Add $mdTheming on OptionDirective Fixes #9894
1 parent fa02e4e commit ed10a6e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/select/select.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ function SelectMenuDirective($parse, $mdUtil, $mdConstant, $mdTheming) {
921921

922922
}
923923

924-
function OptionDirective($mdButtonInkRipple, $mdUtil) {
924+
function OptionDirective($mdButtonInkRipple, $mdUtil, $mdTheming) {
925925

926926
return {
927927
restrict: 'E',
@@ -954,6 +954,8 @@ function OptionDirective($mdButtonInkRipple, $mdUtil) {
954954
var optionCtrl = ctrls[0];
955955
var selectCtrl = ctrls[1];
956956

957+
$mdTheming(element);
958+
957959
if (selectCtrl.isMultiple) {
958960
element.addClass('md-checkbox-enabled');
959961
element.prepend(CHECKBOX_SELECTION_INDICATOR.clone());

0 commit comments

Comments
 (0)