Skip to content

Commit bdcc8c4

Browse files
authored
fix(Table): ensure colspan calc for loading and empty states (#4826)
1 parent cd2bb8d commit bdcc8c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/components/Table.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,13 @@ defineExpose({
490490
</template>
491491

492492
<tr v-else-if="loading && !!slots['loading']">
493-
<td :colspan="columns?.length" :class="ui.loading({ class: props.ui?.loading })">
493+
<td :colspan="tableApi.getAllLeafColumns().length" :class="ui.loading({ class: props.ui?.loading })">
494494
<slot name="loading" />
495495
</td>
496496
</tr>
497497

498498
<tr v-else>
499-
<td :colspan="columns?.length" :class="ui.empty({ class: props.ui?.empty })">
499+
<td :colspan="tableApi.getAllLeafColumns().length" :class="ui.empty({ class: props.ui?.empty })">
500500
<slot name="empty">
501501
{{ empty || t('table.noData') }}
502502
</slot>

0 commit comments

Comments
 (0)