Skip to content

Commit f9ef6c4

Browse files
Fix unexpected side effect in computed function
1 parent 9273cf4 commit f9ef6c4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/plugin/slots/HeadersSlot.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const isAllSelected = ref<boolean>(false);
132132
const items = ref(props.items);
133133
const matchColumnWidths = ref<boolean>(props.matchColumnWidths);
134134
const columnWidths = ref<number[]>(props.columnWidths || []);
135-
const sortAscIcon = ref(props.sortAscIcon);
135+
const sortAscIcon = ref(props.sortAscIcon ?? '$sortAsc');
136136
const tableModelValue = computed(() => props.tableModelValue);
137137
const theme = useTheme();
138138
@@ -149,7 +149,6 @@ watch(() => props.items, (newItems) => {
149149
});
150150
});
151151
152-
153152
// -------------------------------------------------- Header Row //
154153
const headerRowClasses = computed<object>(() => {
155154
return useHeaderRowClasses({ level: props.level });
@@ -290,7 +289,6 @@ const iconSize = computed(() => {
290289
return 'small';
291290
}
292291
293-
sortAscIcon.value = props?.sortAscIcon ?? '$sortAsc';
294292
return 'default';
295293
});
296294

0 commit comments

Comments
 (0)