@bjj/nuxt-layer-shadcn-ui 0.11.11 → 0.11.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -164,6 +164,12 @@ export const PageScroll: Story = {
|
|
|
164
164
|
args: { height: undefined },
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
/** `autoFetch=false` keeps the table idle on mount — click the refresh button in the footer (or call `refresh()` via the exposed ref) to load the first page. */
|
|
168
|
+
export const NoAutoFetch: Story = {
|
|
169
|
+
parameters: noControls,
|
|
170
|
+
args: { autoFetch: false },
|
|
171
|
+
}
|
|
172
|
+
|
|
167
173
|
/** First page loads, but every subsequent `loadMore` call rejects — the bottom loader is replaced by a retry prompt. */
|
|
168
174
|
export const Errored: Story = {
|
|
169
175
|
parameters: {
|
|
@@ -45,6 +45,16 @@ const sortState = ref<{ sortBy: string | null, sortOrder: number | null }>({
|
|
|
45
45
|
|
|
46
46
|
const isInitialLoad = computed(() => loading.value && internalData.value.length === 0)
|
|
47
47
|
|
|
48
|
+
// Precise gate for the bodyEnd slot. Without this, the slot's outer v-if can
|
|
49
|
+
// be true while every inner branch is false, leaving Vue to register an empty
|
|
50
|
+
// slot — DataTable's `$slots.bodyEnd` check then renders a blank trailing row.
|
|
51
|
+
const showBodyEnd = computed(() => {
|
|
52
|
+
if (isInitialLoad.value) return false
|
|
53
|
+
if (errored.value) return true
|
|
54
|
+
if (!hasMore.value) return internalData.value.length > 0
|
|
55
|
+
return started.value
|
|
56
|
+
})
|
|
57
|
+
|
|
48
58
|
// -- IntersectionObserver root: only when internal scroll is active --
|
|
49
59
|
|
|
50
60
|
const dataTableRef = ref<{ scrollEl?: HTMLElement } | null>(null)
|
|
@@ -217,7 +227,7 @@ onMounted(() => {
|
|
|
217
227
|
</template>
|
|
218
228
|
|
|
219
229
|
<template
|
|
220
|
-
v-if="
|
|
230
|
+
v-if="showBodyEnd"
|
|
221
231
|
#bodyEnd
|
|
222
232
|
>
|
|
223
233
|
<div
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bjj/nuxt-layer-shadcn-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.12",
|
|
4
4
|
"description": "Nuxt layer providing shadcn-vue based UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"vue-i18n": "^11",
|
|
43
43
|
"vue-router": "^4 || ^5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "19b43efa4c4d0eea452d05559a5ef5f973958938"
|
|
46
46
|
}
|