mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(button-toggle): clarify ngModel w/ multiple not yet supported (#1757)
This commit is contained in:
committed by
Jeremy Elbourn
parent
8f0265c11b
commit
35285be80f
@@ -44,7 +44,7 @@ Output:
|
||||
|
||||
`md-button-toggle` can be used in a multiple selection group when surrounded by
|
||||
`md-button-toggle-group multiple`. This styles all buttons within the group to appear as a single
|
||||
group of button toggles.
|
||||
group of button toggles. This component does not yet support `NgModel` when using `multiple` mode.
|
||||
|
||||
```html
|
||||
<md-button-toggle-group multiple>
|
||||
|
||||
@@ -66,7 +66,10 @@ export class MdButtonToggleGroup implements AfterViewInit, ControlValueAccessor
|
||||
/** Whether the button toggle group is initialized or not. */
|
||||
private _isInitialized: boolean = false;
|
||||
|
||||
/** The method to be called in order to update ngModel. */
|
||||
/**
|
||||
* The method to be called in order to update ngModel.
|
||||
* Now `ngModel` binding is not supported in multiple selection mode.
|
||||
*/
|
||||
private _controlValueAccessorChangeFn: (value: any) => void = (value) => {};
|
||||
|
||||
/** onTouch function registered via registerOnTouch (ControlValueAccessor). */
|
||||
@@ -200,7 +203,7 @@ export class MdButtonToggleGroup implements AfterViewInit, ControlValueAccessor
|
||||
}
|
||||
}
|
||||
|
||||
/** Multiple selection button-toggle group. */
|
||||
/** Multiple selection button-toggle group. `ngModel` is not supported in this mode. */
|
||||
@Directive({
|
||||
selector: 'md-button-toggle-group[multiple]',
|
||||
exportAs: 'mdButtonToggleGroup',
|
||||
|
||||
Reference in New Issue
Block a user