fix(Table): empty state is displayed if null (#517)

This commit is contained in:
Eduard Aymerich
2023-08-14 21:59:36 +02:00
committed by Benjamin Canac
parent cb5484a603
commit 44ba758c0d

View File

@@ -175,7 +175,10 @@ export default defineComponent({
const indeterminate = computed(() => selected.value && selected.value.length > 0 && selected.value.length < props.rows.length)
const emptyState = computed(() => ({ ...ui.value.default.emptyState, ...props.emptyState }))
const emptyState = computed(() => {
if (props.emptyState === null) return null
return { ...ui.value.default.emptyState, ...props.emptyState }
})
function compare (a: any, z: any) {
if (typeof props.by === 'string') {