diff --git a/front/src/components/common/ActionTable.vue b/front/src/components/common/ActionTable.vue index 4dc34c1ad..b151bf558 100644 --- a/front/src/components/common/ActionTable.vue +++ b/front/src/components/common/ActionTable.vue @@ -162,23 +162,23 @@ const launchAction = async () => { isLoading.value = false } -const slots = useSlots(); +const slots = useSlots() // Count the number of elements inside the "header-cells" slot const columnCount = computed(() => { - return slots['header-cells'] ? slots['header-cells']().length : 0; -}); + return slots['header-cells'] ? slots['header-cells']({}).length : 0 +}) // Compute the correct number of columns const gridColumns = computed(() => { - let columns = columnCount.value; + let columns = columnCount.value // Add 1 column if for the checkbox if there are more than one action if (props.actions.length > 0) { - columns += 1; + columns += 1 } - return Array.from({ length: columns }, () => 'auto'); + return Array.from({ length: columns }, () => 'auto' as 'auto') })