Skip to content

Commit 2098fc6

Browse files
committed
It would be better not to mutate the option disabled state based on the parent state; this can be error prone, as it's easy to miss updating one when the other changes. It's better to rely on the disabled getter for the option to account for the parent state.
1 parent 5ea8e10 commit 2098fc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/list/list-option.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class MdListOption implements AfterContentInit, OnDestroy, Focusable {
116116
this._lineSetter = new MdLineSetter(this._lines, this._renderer, this._element);
117117

118118
if (this.selectionList.disabled) {
119-
this._disabled = true;
119+
this.disabled(true);
120120
}
121121
}
122122

0 commit comments

Comments
 (0)