@bjj/nuxt-layer-shadcn-ui 0.11.8 → 0.11.10
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.
- package/app/components/ui/AsyncDataTable/index.vue +1 -1
- package/app/components/ui/DataTable/index.vue +1 -1
- package/app/components/ui/Dropdown/index.vue +2 -2
- package/app/components/ui/InfiniteDataTable/index.vue +1 -3
- package/app/components/ui/InfiniteDataTable/types.ts +2 -2
- package/app/components/ui/StaticDataTable/index.vue +1 -1
- package/package.json +2 -2
|
@@ -26,7 +26,7 @@ const slots = defineSlots<{
|
|
|
26
26
|
default?: () => any
|
|
27
27
|
popup?: (props: { hide: () => void }) => any
|
|
28
28
|
empty?: () => any
|
|
29
|
-
[key: string]: ((props
|
|
29
|
+
[key: string]: ((props: any) => any) | undefined
|
|
30
30
|
}>()
|
|
31
31
|
|
|
32
32
|
const T = useTranslations('components.ui.Dropdown')
|
|
@@ -116,7 +116,7 @@ onBeforeUnmount(() => {
|
|
|
116
116
|
|
|
117
117
|
<!-- Default menu dropdown -->
|
|
118
118
|
<MenuItems
|
|
119
|
-
v-else-if="menus
|
|
119
|
+
v-else-if="menus?.length"
|
|
120
120
|
:menus="menus"
|
|
121
121
|
/>
|
|
122
122
|
|
|
@@ -4,7 +4,6 @@ import { useEventListener } from '@vueuse/core'
|
|
|
4
4
|
|
|
5
5
|
const props = withDefaults(defineProps<InfiniteDataTableProps<TData>>(), {
|
|
6
6
|
columns: () => [],
|
|
7
|
-
fetchMethod: undefined,
|
|
8
7
|
autoFetch: true,
|
|
9
8
|
filters: undefined,
|
|
10
9
|
pageSize: 30,
|
|
@@ -20,7 +19,7 @@ const emit = defineEmits<{
|
|
|
20
19
|
defineSlots<{
|
|
21
20
|
footer?: () => any
|
|
22
21
|
bodyEnd?: () => any
|
|
23
|
-
[key: string]: ((props
|
|
22
|
+
[key: string]: ((props: any) => any) | undefined
|
|
24
23
|
}>()
|
|
25
24
|
|
|
26
25
|
const { t } = useI18n()
|
|
@@ -100,7 +99,6 @@ function resetState () {
|
|
|
100
99
|
// -- Loading --
|
|
101
100
|
|
|
102
101
|
async function loadMore () {
|
|
103
|
-
if (!props.fetchMethod) return
|
|
104
102
|
if (loading.value || !hasMore.value) return
|
|
105
103
|
|
|
106
104
|
// Calling loadMore is the retry path; the IntersectionChecker is hidden
|
|
@@ -18,10 +18,10 @@ export interface InfiniteDataTableFetchResult<T = Record<string, any>> {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export interface InfiniteDataTableProps<T = Record<string, any>> {
|
|
21
|
+
/** Async function to fetch a page of rows */
|
|
22
|
+
fetchMethod: (params: InfiniteDataTableFetchParams) => Promise<InfiniteDataTableFetchResult<T>>
|
|
21
23
|
/** Column definitions */
|
|
22
24
|
columns?: DataTableColumn[]
|
|
23
|
-
/** Async function to fetch a page of rows */
|
|
24
|
-
fetchMethod?: (params: InfiniteDataTableFetchParams) => Promise<InfiniteDataTableFetchResult<T>>
|
|
25
25
|
/** Whether to fetch the first page on mount (default: true) */
|
|
26
26
|
autoFetch?: boolean
|
|
27
27
|
/** External filter state — changing this resets and reloads */
|
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.10",
|
|
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": "a4211b0981d194c33509a377b05ee3901783ee91"
|
|
46
46
|
}
|