{"record":{"id":"16858f8f1103382f","repo":"vuetifyjs/vuetify","slug":"missing-group","errorCode":null,"errorMessage":"Missing group!","messagePattern":"Missing group!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vuetify/src/components/VDataTable/composables/group.ts","lineNumber":145,"sourceCode":"        }\n      }\n\n      return [...new Set(arr)]\n    }\n    return dive({ type: 'group', items, id: 'dummy', key: 'dummy', value: 'dummy', depth: 0 })\n  }\n\n  const data = { sortByWithGroups, toggleGroup, opened, groupBy, extractRows, isGroupOpen }\n\n  provide(VDataTableGroupSymbol, data)\n\n  return data\n}\n\nexport function useGroupBy () {\n  const data = inject(VDataTableGroupSymbol)\n\n  if (!data) throw new Error('Missing group!')\n\n  return data\n}\n\nfunction groupItemsByProperty <T extends GroupableItem> (items: readonly T[], groupBy: string) {\n  if (!items.length) return []\n\n  const groups = new Map<any, T[]>()\n  for (const item of items) {\n    const value = getObjectValueByPath(item.raw, groupBy)\n\n    if (!groups.has(value)) {\n      groups.set(value, [])\n    }\n    groups.get(value)!.push(item)\n  }\n\n  return groups","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/vuetifyjs/vuetify/blob/8d153908dffb7592eb389ddbfbab955a0ccc977f/packages/vuetify/src/components/VDataTable/composables/group.ts#L127-L163","documentation":"Thrown by useGroupBy() when inject(VDataTableGroupSymbol) is undefined. The grouping state is created by createGroupBy() and provided by the data-table root; descendants consume it via this composable.","triggerScenarios":"Calling useGroupBy() in a component that is not a descendant of a VDataTable-family component (which runs createGroupBy and provides the symbol).","commonSituations":"Importing the internal group composable into a standalone component, using a slot-rendered child outside the table's provide tree, or version mismatch where the symbol key differs.","solutions":["Call useGroupBy() only inside descendants of a VDataTable/VDataTableServer/VDataTableVirtual.","If building a custom table, run createGroupBy(...) and provide(VDataTableGroupSymbol, data) first.","Confirm Vuetify version is consistent across the app (symbol identity can break with duplicates)."],"exampleFix":"// before\nconst { toggleGroup } = useGroupBy()\n\n// after — ensure a VDataTable ancestor exists, or self-provide:\nimport { createGroupBy, VDataTableGroupSymbol } from 'vuetify/components/VDataTable/composables/group'\nconst data = createGroupBy(/* props */, /* emit */)\nprovide(VDataTableGroupSymbol, data)","handlingStrategy":"type-guard","validationCode":"import { inject } from 'vue'\nimport { VDataTableGroupSymbol } from 'vuetify/components/VDataTable/composables/group'\nfunction hasGroupProvider(): boolean {\n  return inject(VDataTableGroupSymbol, null) != null\n}","typeGuard":"import { inject } from 'vue'\nimport { VDataTableGroupSymbol } from 'vuetify/components/VDataTable/composables/group'\nfunction insideGroupTable(): boolean {\n  return inject(VDataTableGroupSymbol, null) != null\n}","tryCatchPattern":"try {\n  useGroupBy()\n} catch (e) {\n  if (e instanceof Error && /Missing group/.test(e.message)) {\n    // provide default or skip feature\n  } else throw e\n}","preventionTips":["Only use table composables within a VDataTable slot subtree.","Document component ancestry requirements in the consuming component.","Pin a single Vuetify version across the workspace."],"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"}