{"record":{"id":"1cac87198fecd6bd","repo":"vuetifyjs/vuetify","slug":"unrecognized-pagination-target-pageby","errorCode":null,"errorMessage":"Unrecognized pagination target ${pageBy}","messagePattern":"Unrecognized pagination target (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vuetify/src/components/VDataTable/composables/paginate.ts","lineNumber":213,"sourceCode":"      paginatedItems: paginatedItemsWithGroups,\n    }\n  }\n\n  if (pageBy === 'any') {\n    const { flatItems } = group(sortedItems)\n    const { paginatedItems: paginatedItemsWithGroups, pageCount, setItemsPerPage, prevPage, nextPage, setPage } = paginate(flatItems)\n\n    return {\n      pageCount,\n      setItemsPerPage,\n      prevPage,\n      nextPage,\n      setPage,\n      paginatedItems: paginatedItemsWithGroups,\n    }\n  }\n\n  throw new Error(`Unrecognized pagination target ${pageBy}`)\n}\n","sourceCodeStart":195,"sourceCodeEnd":215,"githubUrl":"https://github.com/vuetifyjs/vuetify/blob/8d153908dffb7592eb389ddbfbab955a0ccc977f/packages/vuetify/src/components/VDataTable/composables/paginate.ts#L195-L215","documentation":"Thrown by usePaginatedItemsWithGroups() when options.pageBy is none of 'item' | 'group' | 'any'. The switch handles those three literal targets; anything else falls through to a final throw. pageBy controls whether pagination counts raw items, whole groups, or any flat row.","triggerScenarios":"Passing a `pageBy` prop/value other than 'item', 'group', or 'any' (e.g. 'page', 'row', undefined-with-fallback-bug, or a typo like 'items'). Triggered by VDataTable's `page-by` / pageBy option.","commonSituations":"Typo in the `pageBy` prop, passing an untranslated value from an enum that does not match the union, or a version change where the allowed values were renamed.","solutions":["Set `page-by` (pageBy) to one of 'item', 'group', or 'any'.","Omit the prop to use the default rather than passing an invalid string.","If the value comes from a variable, narrow its type to `'item' | 'group' | 'any'` so the compiler catches typos."],"exampleFix":"// before\n<VDataTable :page-by=\"'row'\" :group-by=\"groupBy\" />\n\n// after\n<VDataTable page-by=\"group\" :group-by=\"groupBy\" />\n// (only when grouping; otherwise omit it)","handlingStrategy":"validation","validationCode":"type PageBy = 'item' | 'group' | 'any'\nfunction isPageBy(v: unknown): v is PageBy {\n  return v === 'item' || v === 'group' || v === 'any'\n}\nfunction resolvePageBy(v: unknown): PageBy {\n  return isPageBy(v) ? v : 'item'\n}","typeGuard":"function isPageBy(v: unknown): v is 'item' | 'group' | 'any' {\n  return v === 'item' || v === 'group' || v === 'any'\n}","tryCatchPattern":null,"preventionTips":["Type the prop as the literal union so the compiler rejects typos.","Default pageBy to 'item' instead of passing through untrusted input.","Add a unit test for each valid value."],"tags":["vdatatable","pagination","input-validation","enum"],"backgroundTag":null,"analyzedSha":"8d153908dffb7592eb389ddbfbab955a0ccc977f","analyzedAt":"2026-08-12T21:54:20.596Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}