5858 <v-icon
5959 v-else-if =" column.sortable"
6060 :class =" sortIconClasses(column.key as keyof Column)"
61+ :icon =" sortAscIcon"
62+ :size =" iconSize"
6163 >
62- mdi mdi-arrow-up
6364 </v-icon >
6465 </div >
6566 </th >
@@ -74,6 +75,7 @@ import {
7475 HeaderSlotProps ,
7576 InternalDataTableHeader ,
7677} from ' @/types' ;
78+ import type { IconOptions } from ' vuetify' ;
7779import {
7880 useCellAlignClasses ,
7981 useHeaderCellClasses ,
@@ -95,6 +97,7 @@ const props = withDefaults(defineProps<HeaderSlotProps>(), {
9597 showSelect: false ,
9698});
9799
100+ const iconOptions = inject <IconOptions >(Symbol .for (' vuetify:icons' ));
98101const theme = useTheme ();
99102const isAllSelected = ref <boolean >(props .slotProps .allRowsSelected );
100103
@@ -103,6 +106,10 @@ const columns = computed<Column[]>(() => props.slotProps.columns);
103106const someSelected = computed (() => props .slotProps .someSelected );
104107const isIndeterminate = computed (() => someSelected .value && ! props .slotProps .allRowsSelected );
105108
109+ // TODO: This may change if pull request is accepted //
110+ // ? https://github.com/vuetifyjs/vuetify/pull/17598 //
111+ const sortAscIcon = ref (' $sortAsc' );
112+
106113
107114// -------------------------------------------------- Header Row //
108115const headerRowClasses = computed <object >(() => {
@@ -159,6 +166,7 @@ const checkBoxClasses = computed<object>(() => {
159166// -------------------------------------------------- Sorting //
160167const sortIconClasses = (key : string ): object => {
161168 return useSortIconClasses ({
169+ iconOptions ,
162170 key ,
163171 level: props .level ,
164172 sortBy: props .sortBy ,
@@ -172,6 +180,18 @@ function sortColumn(column: InternalDataTableHeader): void {
172180}
173181
174182
183+ // -------------------------------------------------- Icons //
184+ const iconSize = computed (() => {
185+ if (iconOptions ?.defaultSet === ' fa' ) {
186+ sortAscIcon .value = ' fas fa-arrow-up' ;
187+ return ' small' ;
188+ }
189+
190+ sortAscIcon .value = ' $sortAsc' ;
191+ return ' default' ;
192+ });
193+
194+
175195// -------------------------------------------------- Render //
176196function renderCell(column : Column ): unknown {
177197 return useRenderCell (column );
@@ -214,6 +234,10 @@ $hover: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
214234 & -desc {
215235 transform : rotate (180deg );
216236 }
237+
238+ // &-fa {
239+ // font-size: 1rem;
240+ // }
217241 }
218242
219243 & :hover {
0 commit comments