jeudi 28 mai 2015

ng-model breaks checkbox in Firefox

                    <table st-table="exams" st-safe-src="exams" st-pipe="getExams" class="table table-bordered">

                    <thead st-reset="isReset" st-toggle="toggle">
                        <tr>

                            <th cs-select-all="exams">
                                <input type="checkbox" ng-model="selectedAll" ng-click="checkAllExams()"/>
                            </th>
                            <th st-sort="A" width="25%">A</th>
                            <th st-sort-default="reverse" st-sort="B" width="10%">B</th>
                            <th st-sort="C" width="10%">C</th>
                            <th st-sort="D" width="25%">D</th>
                            <th st-sort="E" width="10%">E</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody ng-repeat="exam in exams">
                        <tr>
                            <td cs-select="exam">
                            <input type="checkbox" ng-model="exam.isSelected">
                            </td>
                            <td>{{exam.A}}</td>
                            <td>{{exam.B| date: 'yyyy-MM-dd'}}</td>
                            <td>{{exam.C}}</td>
                            <td>{{exam.D}}</td>
                            <td>{{exam.E}}</td>
                            <td>
                                <a class="btn btn-info" ng-click="Details(exam)"><i
                                        class="glyphicon glyphicon-zoom-in icon-white"></i></a>
                            </td>
                        </tr>
                    </tbody>
                    <tfoot ng-hide="isLoading">
                    <tr>
                        <td colspan="10" class="text-center">
                            <div st-pagination="" st-items-by-page="15"></div>
                        </td>
                    </tr>
                    </tfoot>
                </table>

I have code that resembles something like this. I am using smart-table (http://ift.tt/1aXjM1N) with Angular to display a series of exam info from the database.

The problem lies in the line

<input type="checkbox" ng-model="exam.isSelected">

in Firefox. It works perfectly in chrome but in firefox, I cannot check the checkbox. Interestingly enough, the "select all" checkbox in the table header still works.

What could be the issue?




Aucun commentaire:

Enregistrer un commentaire