Skip to content

Commit 8d934c3

Browse files
committed
fix: CDataTable - fix table styles, support dark mode
1 parent 815ad60 commit 8d934c3

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/components/table/CDataTable.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
>
88
<label class="mr-2">{{tableFilterData.label}}</label>
99
<input
10-
class="form-control table-filter"
10+
class="form-control"
1111
type="text"
1212
:placeholder="tableFilterData.placeholder"
1313
@input="tableFilterChange($event.target.value, 'input')"
@@ -80,7 +80,7 @@
8080
<slot :name="`${rawColumnNames[index]}-filter`">
8181
<input
8282
v-if="!fields || fields[index].filter !== false"
83-
class="w-100 table-filter"
83+
class="form-control form-control-sm"
8484
@input="columnFilterEvent(colName, $event.target.value, 'input')"
8585
@change="columnFilterEvent(colName, $event.target.value, 'change')"
8686
:value="columnFilterState[colName]"
@@ -523,6 +523,10 @@ export default {
523523
</script>
524524

525525
<style scoped>
526+
thead tr:not(:last-child) th {
527+
border-bottom: 1px;
528+
}
529+
526530
.transparent {
527531
opacity: 0.4;
528532
}

src/components/table/tests/__snapshots__/CDataTable.spec.js.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ exports[`CDataTable renders correctly 2`] = `
7474
</label>
7575
7676
<input
77-
class="form-control table-filter"
77+
class="form-control"
7878
placeholder="type string..."
7979
type="text"
8080
/>
@@ -256,28 +256,28 @@ exports[`CDataTable renders correctly 2`] = `
256256
class="user-custom-class"
257257
>
258258
<input
259-
class="w-100 table-filter"
259+
class="form-control form-control-sm"
260260
/>
261261
</th>
262262
<th
263263
class=""
264264
>
265265
<input
266-
class="w-100 table-filter"
266+
class="form-control form-control-sm"
267267
/>
268268
</th>
269269
<th
270270
class=""
271271
>
272272
<input
273-
class="w-100 table-filter"
273+
class="form-control form-control-sm"
274274
/>
275275
</th>
276276
<th
277277
class=""
278278
>
279279
<input
280-
class="w-100 table-filter"
280+
class="form-control form-control-sm"
281281
/>
282282
</th>
283283
<th

0 commit comments

Comments
 (0)