0

enter image description hereI arranged the checkboxes and the text right next to each other using bootstrap grid. But, when I click on the textbox other than the first one, only the first checkbox gets enabled. How do I make the respective checkboxes get enabled without distorting the order?


Here is my stackblitz url

Pushprajsinh Chudasama
  • 7,772
  • 4
  • 20
  • 43
Shivani
  • 301
  • 5
  • 12

1 Answers1

0

The stackblitz is not working properly but one thing you can try is making the id of the checkboxes unique like component-

public routes=[{"id":1, "place":"Chennai - 500085/Madhapur, TS"}, {"id":2, 
"place":"chennai-mumbai"}, {"id":3, "place":"chennai-madhapur"}, {"id":4, 
"place":"chennai-secundrabad"}];

html-

<div class="col-sm-1" style="margin-top: 10px;">
                    <mat-checkbox class="check-style" id="route.id"></mat-checkbox>
                </div>
                <div class="col-sm-10">
                    <div class="routesList">
                        {{route.place}}
                    </div>
                </div>

I hope it helps.