Skip to content

Commit a269485

Browse files
Ahtsham RaziqYousef Sultan
authored andcommitted
Fix duplicate keys (#38)
1 parent 7f04451 commit a269485

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/DataTable.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060

6161
<tbody>
6262
<tr v-for="(row, index) in paginated" :class="{ clickable : clickable }" :key="index" @click="click(row)">
63-
<td v-for="column in columns" :class=" { numeric : column.numeric } " :key="index">
63+
<td v-for="(column, columnIndex) in columns" :class=" { numeric : column.numeric } " :key="columnIndex">
6464
<div v-if="!column.html"> {{ collect(row, column.field) }} </div>
65-
<div v-if="column.html" v-html="collect(row, column.field)"></div>
65+
<div v-if="column.html" v-html="collect(row, column.field)"></div>
6666
</td>
6767
<slot name="tbody-tr" :row="row"></slot>
6868
</tr>
@@ -74,7 +74,7 @@
7474
<label>
7575
<span>{{lang['rows_per_page']}}:</span>
7676
<select class="browser-default" @change="onTableLength">
77-
<option v-for="option in perPageOptions" :value="option" :selected="option == currentPerPage" :key="index">
77+
<option v-for="(option, index) in perPageOptions" :value="option" :selected="option == currentPerPage" :key="index">
7878
{{ option === -1 ? lang['all'] : option }}
7979
</option>
8080
</select>
@@ -255,7 +255,7 @@
255255
for (let i = 0; i < splitter.length; i++){
256256
if (result == undefined)
257257
return undefined;
258-
258+
259259
result = result[splitter[i]];
260260
}
261261
@@ -458,7 +458,7 @@
458458
display: flex;
459459
-webkit-flex-direction: row;
460460
/* works with row or column */
461-
461+
462462
flex-direction: row;
463463
-webkit-align-items: center;
464464
align-items: center;
@@ -471,7 +471,7 @@
471471
display: flex;
472472
-webkit-flex-direction: row;
473473
/* works with row or column */
474-
474+
475475
flex-direction: row;
476476
-webkit-align-items: center;
477477
align-items: center;
@@ -607,7 +607,7 @@
607607
table tbody tr:hover {
608608
background-color: #EEE;
609609
}
610-
610+
611611
table th:last-child,
612612
table td:last-child {
613613
padding-right: 14px;

0 commit comments

Comments
 (0)