@bjj/nuxt-layer-shadcn-ui 0.11.11 → 0.11.13
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
|
|
@@ -168,7 +168,7 @@ function makeTriggerClass (base: string, idleHover: string) {
|
|
|
168
168
|
base,
|
|
169
169
|
isInvalid.value ? 'border-danger' : idleHover,
|
|
170
170
|
isDragOver.value && !isInvalid.value && 'border-primary bg-primary/5',
|
|
171
|
-
props.disabled && disabledClass,
|
|
171
|
+
(props.disabled || reachedMax.value) && disabledClass,
|
|
172
172
|
)
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -474,7 +474,7 @@ async function onDrop (e: DragEvent) {
|
|
|
474
474
|
v-else-if="variant === 'drag' && showTrigger"
|
|
475
475
|
:class="dragAreaClass"
|
|
476
476
|
role="button"
|
|
477
|
-
:aria-disabled="disabled || undefined"
|
|
477
|
+
:aria-disabled="disabled || reachedMax || undefined"
|
|
478
478
|
@click="triggerSelect"
|
|
479
479
|
@dragover="onDragOver"
|
|
480
480
|
@dragleave="onDragLeave"
|
|
@@ -631,10 +631,10 @@ async function onDrop (e: DragEvent) {
|
|
|
631
631
|
</div>
|
|
632
632
|
|
|
633
633
|
<button
|
|
634
|
-
v-if="showTrigger
|
|
634
|
+
v-if="showTrigger"
|
|
635
635
|
type="button"
|
|
636
636
|
:class="boxTriggerClass"
|
|
637
|
-
:disabled="disabled"
|
|
637
|
+
:disabled="disabled || reachedMax"
|
|
638
638
|
@click="triggerSelect"
|
|
639
639
|
@dragover="onDragOver"
|
|
640
640
|
@dragleave="onDragLeave"
|
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.13",
|
|
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": "32c302136c96baf9c07a08c8c0df39ec0ac49432"
|
|
46
46
|
}
|