Skip to content

Commit f1c23a1

Browse files
committed
add class name for each column
1 parent b6ce15e commit f1c23a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

resources/js/ui/Table/Table.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108

109109
<th v-for="(column, index) in displayable"
110110
v-show="! hasSelections"
111-
:class="{'sortable': isSortable(column), 'active': (sort.key === column), 'w-96': (column === 'url')}"
111+
:class="{'sortable': isSortable(column), 'active': (sort.key === column), 'w-96': (column === 'url'), ['th-' + column]: true}"
112112
:key="column[primaryKey] || index">
113113
<a href="#" v-if="isSortable(column)" class="table__heading table__heading--link" @click.prevent="isSortable(column) && sortRecordsBy(column)" :aria-label="'Sort by ' + column_names[column] || column">
114114
<span>{{ column_names[column] || column }}</span>
@@ -141,7 +141,7 @@
141141
</div>
142142
</th>
143143

144-
<th v-show="hasActions && ! hasSelections" class="w-20">&nbsp;</th>
144+
<th v-show="hasActions && ! hasSelections" class="w-20 col-actions">&nbsp;</th>
145145
</tr>
146146
</thead>
147147

@@ -160,7 +160,7 @@
160160
</div>
161161
</td>
162162

163-
<td v-for="column in displayable"
163+
<td v-for="column in displayable" :class="'td-' + column"
164164
:key="column">
165165
<span class="column-label">{{ column_names[column] || column }}</span>
166166

@@ -175,7 +175,7 @@
175175
</slot>
176176
</td>
177177

178-
<td class="table__actions w-20" v-if="hasActions">
178+
<td class="'table__actions w-20 col-actions'" v-if="hasActions">
179179
<slot name="actions" :record="record"></slot>
180180
</td>
181181
</tr>

0 commit comments

Comments
 (0)