Snippet:
<mat-button-toggle-group value="0" (change)="toggleChangeQuestion($event)" name="selectQuestions" #group2="matButtonToggleGroup">
<div *ngFor="let item of test; let i = index;">
<mat-button-toggle *ngIf="!item.answer" value="{{i}}">{{i}}</mat-button-toggle>
</div>
</mat-button-toggle-group>
Below is the layout with more than 5 items in 'test' array :
https://i.sstatic.net/Ro2z6.jpg
The expected design:
https://i.sstatic.net/vLDgp.png
I've experimented with various CSS properties like display, width, and height but couldn't achieve the desired outcome. How can I arrange the buttons into rows instead?