Skip to content

Commit

Permalink
fix(button-toggle): conflict with radio component (angular#2343)
Browse files Browse the repository at this point in the history
Prevents the button toggle from conflicting with radio buttons on the same page. This was because both components were using the same pattern to generate unique `name` attributes.

Fixes angular#2274.
  • Loading branch information
crisbeto authored and kara committed Jan 20, 2017
1 parent 4329379 commit 0a28a5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/button-toggle/button-toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class MdButtonToggleGroup implements AfterViewInit, ControlValueAccessor
private _value: any = null;

/** The HTML name attribute applied to toggles in this group. */
private _name: string = `md-radio-group-${_uniqueIdCounter++}`;
private _name: string = `md-button-toggle-group-${_uniqueIdCounter++}`;

/** Disables all toggles in the group. */
private _disabled: boolean = null;
Expand Down

0 comments on commit 0a28a5d

Please sign in to comment.