Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/runtime/components/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,13 @@ defineExpose({
</template>

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

<tr v-else>
<td :colspan="columns?.length" :class="ui.empty({ class: props.ui?.empty })">
<td :colspan="tableApi.getAllLeafColumns().length" :class="ui.empty({ class: props.ui?.empty })">
Comment on lines +493 to +499
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tableApi.getAllLeafColumns().length call could potentially throw an error if tableApi is undefined or null. Consider adding a null check or providing a fallback value to prevent runtime errors.

Copilot uses AI. Check for mistakes.
Comment on lines +493 to +499
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tableApi.getAllLeafColumns().length call could potentially throw an error if tableApi is undefined or null. Consider adding a null check or providing a fallback value to prevent runtime errors.

Copilot uses AI. Check for mistakes.
<slot name="empty">
{{ empty || t('table.noData') }}
</slot>
Expand Down
Loading