Skip to content

Commit 3391c33

Browse files
fix(button-group): deprecated multiSelection property
1 parent 6570f3a commit 3391c33

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

projects/igniteui-angular/src/lib/buttonGroup/buttonGroup.component.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,28 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
118118
return this._itemContentCssClass;
119119
}
120120

121+
/**
122+
* An @Input property that enables selecting multiple buttons. By default, multi-selection is false.
123+
* ```html
124+
* <igx-buttongroup [multiSelection]="false" [alignment]="alignment"></igx-buttongroup>
125+
* ```
126+
*/
127+
@Input()
128+
public get multiSelection() {
129+
if (this.selectionMode === 'multi') {
130+
return true;
131+
} else {
132+
return false;
133+
}
134+
}
135+
public set multiSelection(selectionMode: boolean) {
136+
if (selectionMode) {
137+
this.selectionMode = 'multi';
138+
} else {
139+
this.selectionMode = 'single';
140+
}
141+
}
142+
121143
/**
122144
* An @Input property that sets the selection mode of the buttons. By default, the selection mode is single.
123145
* ```html

0 commit comments

Comments
 (0)