Skip to content

Commit 35285be

Browse files
tinayuangaojelbourn
authored andcommitted
docs(button-toggle): clarify ngModel w/ multiple not yet supported (#1757)
1 parent 8f0265c commit 35285be

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/lib/button-toggle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Output:
4444

4545
`md-button-toggle` can be used in a multiple selection group when surrounded by
4646
`md-button-toggle-group multiple`. This styles all buttons within the group to appear as a single
47-
group of button toggles.
47+
group of button toggles. This component does not yet support `NgModel` when using `multiple` mode.
4848

4949
```html
5050
<md-button-toggle-group multiple>

src/lib/button-toggle/button-toggle.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ export class MdButtonToggleGroup implements AfterViewInit, ControlValueAccessor
6666
/** Whether the button toggle group is initialized or not. */
6767
private _isInitialized: boolean = false;
6868

69-
/** The method to be called in order to update ngModel. */
69+
/**
70+
* The method to be called in order to update ngModel.
71+
* Now `ngModel` binding is not supported in multiple selection mode.
72+
*/
7073
private _controlValueAccessorChangeFn: (value: any) => void = (value) => {};
7174

7275
/** onTouch function registered via registerOnTouch (ControlValueAccessor). */
@@ -200,7 +203,7 @@ export class MdButtonToggleGroup implements AfterViewInit, ControlValueAccessor
200203
}
201204
}
202205

203-
/** Multiple selection button-toggle group. */
206+
/** Multiple selection button-toggle group. `ngModel` is not supported in this mode. */
204207
@Directive({
205208
selector: 'md-button-toggle-group[multiple]',
206209
exportAs: 'mdButtonToggleGroup',

0 commit comments

Comments
 (0)