Skip to content

Commit 2f75560

Browse files
committed
fix config list to be sorted
1 parent 3e7b6b1 commit 2f75560

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

webui/src/components/dashboard/ConfigCard.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { computed, onUnmounted, type Ref } from 'vue'
33
import { usePrettyDates } from '@/composables/usePrettyDate'
44
import { useRouter } from '@/router'
5-
import { useRoute } from 'vue-router'
65
import { getRouteName, useDashboard } from '@/composables/dashboard'
76
87
const { format } = usePrettyDates()
@@ -25,10 +24,14 @@ if (props.configs === undefined) {
2524
}
2625
2726
const configs = computed(() => {
28-
if (!props.configs) {
29-
return data?.value ?? []
27+
if (props.configs) {
28+
return props.configs.sort(compareConfig)
3029
}
31-
return props.configs.sort(compareConfig)
30+
if (data && data.value) {
31+
console.log('sort')
32+
return data.value.sort(compareConfig)
33+
}
34+
return [];
3235
})
3336
3437
const title = computed(() => props.title ? props.title : "Configs")

0 commit comments

Comments
 (0)