Skip to content

Commit

Permalink
It would be better not to mutate the option disabled state based on t…
Browse files Browse the repository at this point in the history
…he 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.
  • Loading branch information
sllethe committed Aug 10, 2017
1 parent 5ea8e10 commit 2098fc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/list/list-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class MdListOption implements AfterContentInit, OnDestroy, Focusable {
this._lineSetter = new MdLineSetter(this._lines, this._renderer, this._element);

if (this.selectionList.disabled) {
this._disabled = true;
this.disabled(true);
}
}

Expand Down

0 comments on commit 2098fc6

Please sign in to comment.