{"record":{"id":"e52dbec82048ef12","repo":"vuetifyjs/vuetify","slug":"missing-headers","errorCode":null,"errorMessage":"Missing headers!","messagePattern":"Missing headers!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vuetify/src/components/VDataTable/composables/headers.ts","lineNumber":348,"sourceCode":"      }\n\n      if (header.filter) {\n        filterFunctions.value[header.key] = header.filter\n      }\n    }\n  })\n\n  const data = { headers, columns, sortFunctions, sortRawFunctions, filterFunctions }\n\n  provide(VDataTableHeadersSymbol, data)\n\n  return data\n}\n\nexport function useHeaders () {\n  const data = inject(VDataTableHeadersSymbol)\n\n  if (!data) throw new Error('Missing headers!')\n\n  return data\n}\n","sourceCodeStart":330,"sourceCodeEnd":352,"githubUrl":"https://github.com/vuetifyjs/vuetify/blob/8d153908dffb7592eb389ddbfbab955a0ccc977f/packages/vuetify/src/components/VDataTable/composables/headers.ts#L330-L352","documentation":"Thrown by useHeaders() when inject(VDataTableHeadersSymbol) is undefined. Header/column state is provided by createHeaders() in the data-table root. Descendants (column components, slots) consume it via useHeaders().","triggerScenarios":"Calling useHeaders() outside a VDataTable-family provider, e.g. in a standalone column editor or a header slot rendered outside the table.","commonSituations":"Building a custom data-table shell without createHeaders, rendering header-related components outside the table's provide scope, or duplicate Vuetify installs breaking symbol identity.","solutions":["Call useHeaders() only inside descendants of a VDataTable-family component.","For a custom table, call createHeaders(...) and provide(VDataTableHeadersSymbol, data).","Make sure only one copy of Vuetify is installed (check pnpm/npm for duplicates)."],"exampleFix":"// before\nconst { columns } = useHeaders()\n\n// after\nimport { createHeaders, VDataTableHeadersSymbol } from 'vuetify/components/VDataTable/composables/headers'\nconst data = createHeaders(/* props */)\nprovide(VDataTableHeadersSymbol, data)","handlingStrategy":"type-guard","validationCode":"import { inject } from 'vue'\nimport { VDataTableHeadersSymbol } from 'vuetify/components/VDataTable/composables/headers'\nfunction hasHeadersProvider(): boolean {\n  return inject(VDataTableHeadersSymbol, null) != null\n}","typeGuard":"import { inject } from 'vue'\nimport { VDataTableHeadersSymbol } from 'vuetify/components/VDataTable/composables/headers'\nfunction insideHeadersTable(): boolean {\n  return inject(VDataTableHeadersSymbol, null) != null\n}","tryCatchPattern":"try {\n  useHeaders()\n} catch (e) {\n  if (e instanceof Error && /Missing headers/.test(e.message)) {\n    // no header context; degrade gracefully\n  } else throw e\n}","preventionTips":["Render header-consuming components only inside VDataTable descendants.","Re-provide symbols when building custom table shells.","Avoid duplicate Vuetify installs."],"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"}