@bjj/nuxt-layer-shadcn-ui 0.11.9 → 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.
@@ -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,
@@ -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.9",
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": "224de24822a34f421746189a23c7513fe662537f"
45
+ "gitHead": "a4211b0981d194c33509a377b05ee3901783ee91"
46
46
  }