Skip to content

Commit 125fd5e

Browse files
committed
fix: CDataTable - fix icons
1 parent 885b010 commit 125fd5e

File tree

2 files changed

+14
-89
lines changed

2 files changed

+14
-89
lines changed

src/components/table/CDataTable.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
>
6666
<CIcon
6767
width="18"
68-
name="arrowTop"
68+
:content="$options.icons.arrowTop"
6969
:class="iconClasses(index)"
7070
/>
7171
</slot>
@@ -144,7 +144,7 @@
144144
<h2>{{ passedItems.length ? 'No filtering results ' : 'No items'}}
145145
<CIcon
146146
width="30"
147-
name="ban"
147+
:content="$options.icons.ban"
148148
class="text-danger mb-2"
149149
/>
150150
</h2>
@@ -210,12 +210,12 @@
210210
<script>
211211
import CSpinner from '../spinner/CSpinner'
212212
import CPagination from '../pagination/CPagination'
213-
import { CIcon as CIconRaw } from '@coreui/icons-vue/index.js'
213+
import { CIcon } from '@coreui/icons-vue/index.js'
214214
import { arrowTop, ban } from '@coreui/icons'
215-
const CIcon = Object.assign({}, CIconRaw, { icons : { arrowTop, ban }})
216215
217216
export default {
218217
name: 'CDataTable',
218+
icons: { arrowTop, ban },
219219
components: {
220220
CPagination,
221221
CSpinner,

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

Lines changed: 10 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -575,25 +575,10 @@ exports[`CDataTable renders correctly 2`] = `
575575
576576
<svg
577577
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position rotate-icon"
578-
viewBox="0 0 24 24"
578+
viewBox="0 0 64 64"
579579
width="18"
580580
xmlns="http://www.w3.org/2000/svg"
581-
>
582-
583-
584-
585-
<title>
586-
arrow-top
587-
</title>
588-
589-
590-
<path
591-
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
592-
/>
593-
594-
595-
596-
</svg>
581+
/>
597582
</th>
598583
<th
599584
class="position-relative pr-4"
@@ -607,25 +592,10 @@ exports[`CDataTable renders correctly 2`] = `
607592
608593
<svg
609594
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position transparent"
610-
viewBox="0 0 24 24"
595+
viewBox="0 0 64 64"
611596
width="18"
612597
xmlns="http://www.w3.org/2000/svg"
613-
>
614-
615-
616-
617-
<title>
618-
arrow-top
619-
</title>
620-
621-
622-
<path
623-
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
624-
/>
625-
626-
627-
628-
</svg>
598+
/>
629599
</th>
630600
<th
631601
class="position-relative pr-4"
@@ -639,25 +609,10 @@ exports[`CDataTable renders correctly 2`] = `
639609
640610
<svg
641611
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position transparent"
642-
viewBox="0 0 24 24"
612+
viewBox="0 0 64 64"
643613
width="18"
644614
xmlns="http://www.w3.org/2000/svg"
645-
>
646-
647-
648-
649-
<title>
650-
arrow-top
651-
</title>
652-
653-
654-
<path
655-
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
656-
/>
657-
658-
659-
660-
</svg>
615+
/>
661616
</th>
662617
<th
663618
class="position-relative pr-4"
@@ -671,25 +626,10 @@ exports[`CDataTable renders correctly 2`] = `
671626
672627
<svg
673628
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position transparent"
674-
viewBox="0 0 24 24"
629+
viewBox="0 0 64 64"
675630
width="18"
676631
xmlns="http://www.w3.org/2000/svg"
677-
>
678-
679-
680-
681-
<title>
682-
arrow-top
683-
</title>
684-
685-
686-
<path
687-
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
688-
/>
689-
690-
691-
692-
</svg>
632+
/>
693633
</th>
694634
<th
695635
class="position-relative pr-4"
@@ -703,25 +643,10 @@ exports[`CDataTable renders correctly 2`] = `
703643
704644
<svg
705645
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position transparent"
706-
viewBox="0 0 24 24"
646+
viewBox="0 0 64 64"
707647
width="18"
708648
xmlns="http://www.w3.org/2000/svg"
709-
>
710-
711-
712-
713-
<title>
714-
arrow-top
715-
</title>
716-
717-
718-
<path
719-
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
720-
/>
721-
722-
723-
724-
</svg>
649+
/>
725650
</th>
726651
</tr>
727652
</tfoot>

0 commit comments

Comments
 (0)