{"record":{"id":"e88ea8fbd27c8e18","repo":"vuetifyjs/vuetify","slug":"missing-pagination","errorCode":null,"errorMessage":"Missing pagination!","messagePattern":"Missing pagination!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vuetify/src/components/VDataTable/composables/paginate.ts","lineNumber":116,"sourceCode":"  function prevPage () {\n    page.value = clamp(page.value - 1, 1, pageCount.value)\n  }\n\n  function setPage (value: number) {\n    page.value = clamp(value, 1, pageCount.value)\n  }\n\n  const data = { page, itemsPerPage, startIndex, stopIndex, pageCount, itemsLength, nextPage, prevPage, setPage, setItemsPerPage }\n\n  provide(VDataTablePaginationSymbol, data)\n\n  return data\n}\n\nexport function usePagination () {\n  const data = inject(VDataTablePaginationSymbol)\n\n  if (!data) throw new Error('Missing pagination!')\n\n  return data\n}\n\nexport function usePaginatedItems <T> (options: {\n  items: MaybeRefOrGetter<readonly T[]>\n  startIndex: Ref<number>\n  stopIndex: Ref<number>\n  itemsPerPage: Ref<number>\n}) {\n  const vm = getCurrentInstance('usePaginatedItems')\n\n  const { items, startIndex, stopIndex, itemsPerPage } = options\n  const paginatedItems = computed(() => {\n    if (itemsPerPage.value <= 0) return toValue(items)\n\n    return toValue(items).slice(startIndex.value, stopIndex.value)\n  })","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/vuetifyjs/vuetify/blob/8d153908dffb7592eb389ddbfbab955a0ccc977f/packages/vuetify/src/components/VDataTable/composables/paginate.ts#L98-L134","documentation":"Thrown by usePagination() when inject(VDataTablePaginationSymbol) is undefined. Pagination state is created by createPagination() and provided by the data-table root.","triggerScenarios":"Calling usePagination() in a component that is not a descendant of a VDataTable-family component that ran createPagination.","commonSituations":"Using the pagination composable in a custom footer/pager component rendered outside the table, refactoring the table without preserving the provider, or duplicate Vuetify installs.","solutions":["Call usePagination() only inside descendants of a VDataTable-family component.","For a custom table, run createPagination(...) and provide(VDataTablePaginationSymbol, data).","Verify a single Vuetify install so Symbol.for-based keys resolve identically."],"exampleFix":"// before\nconst { page, setPage } = usePagination()\n\n// after\nimport { createPagination, VDataTablePaginationSymbol } from 'vuetify/components/VDataTable/composables/paginate'\nconst data = createPagination(/* props */)\nprovide(VDataTablePaginationSymbol, data)","handlingStrategy":"type-guard","validationCode":"import { inject } from 'vue'\nimport { VDataTablePaginationSymbol } from 'vuetify/components/VDataTable/composables/paginate'\nfunction hasPaginationProvider(): boolean {\n  return inject(VDataTablePaginationSymbol, null) != null\n}","typeGuard":"import { inject } from 'vue'\nimport { VDataTablePaginationSymbol } from 'vuetify/components/VDataTable/composables/paginate'\nfunction insidePaginatedTable(): boolean {\n  return inject(VDataTablePaginationSymbol, null) != null\n}","tryCatchPattern":"try {\n  usePagination()\n} catch (e) {\n  if (e instanceof Error && /Missing pagination/.test(e.message)) {\n    // local pagination fallback\n  } else throw e\n}","preventionTips":["Call pagination composables only within VDataTable descendants.","Provide the symbol yourself when building a custom pager.","Keep one Vuetify install to preserve symbol identity."],"tags":["vdatatable","injection","composable-misuse","vue"],"backgroundTag":null,"analyzedSha":"8d153908dffb7592eb389ddbfbab955a0ccc977f","analyzedAt":"2026-08-12T21:54:20.596Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}