{"record":{"id":"d1a4a356388200bf","repo":"facebook/lexical","slug":"tablenode-hashorizontalscroll-is-active-but-theme","errorCode":null,"errorMessage":"TableNode: hasHorizontalScroll is active but theme.tableScrollableWrapper is not defined.","messagePattern":"TableNode: hasHorizontalScroll is active but theme\\.tableScrollableWrapper is not defined\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/lexical-table/src/LexicalTableNode.ts","lineNumber":361,"sourceCode":"    editor,\n    '@lexical/table/Table',\n  );\n  // peek() so a reconcile that runs inside a signals effect (e.g. via a\n  // discrete update or force-commit read) does not subscribe that effect to\n  // the table config; re-rendering on change is the TableExtension's job.\n  return dep\n    ? dep.output.hasStickyScrollbar.peek() &&\n        dep.output.hasHorizontalScroll.peek()\n    : false;\n}\n\nexport function setScrollableTablesActive(\n  editor: LexicalEditor,\n  active: boolean,\n): void {\n  if (active) {\n    if (__DEV__ && editor._config.theme.tableScrollableWrapper === undefined) {\n      console.warn(\n        'TableNode: hasHorizontalScroll is active but theme.tableScrollableWrapper is not defined.',\n      );\n    }\n    scrollableEditors.add(editor);\n  } else {\n    scrollableEditors.delete(editor);\n  }\n}\n\n/** @noInheritDoc */\nexport class TableNode extends ElementNode {\n  /** @internal */\n  __rowStriping: boolean = false;\n  __frozenColumnCount: number = 0;\n  __frozenRowCount: number = 0;\n  // Initialized unconditionally (not `__colWidths?: ...`) so a freshly\n  // constructed instance always has the own property — `@lexical/yjs` derives a\n  // node's syncable properties from `Object.keys(new Klass())`, so an","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/facebook/lexical/blob/76a22dcba981b46119fcec45f935270707e26a57/packages/lexical-table/src/LexicalTableNode.ts#L343-L379","documentation":"setScrollableTablesActive(editor, true) registers the editor for horizontally-scrollable table rendering, which wraps tables in an element themed by theme.tableScrollableWrapper. If that theme class is undefined in __DEV__, Lexical warns because the scrollable wrapper will have no CSS class, so the feature likely appears broken or unstyled.","triggerScenarios":"Calling setScrollableTablesActive(editor, true) (directly, or via TablePlugin/register paths that enable hasHorizontalScroll) while editor._config.theme.tableScrollableWrapper is undefined.","commonSituations":"Enabling table horizontal scroll (TablePlugin hasHorizontalScroll option) without adding tableScrollableWrapper to the editor theme; copying a config from docs that omits the theme key.","solutions":["Add `tableScrollableWrapper` to your editor theme config with a CSS class, and style that class (e.g. overflow-x: auto).","If you do not want scrollable tables, do not call setScrollableTablesActive(editor, true) / disable the hasHorizontalScroll option.","Suppress or ignore the warning in non-dev environments only — fix the theme in dev."],"exampleFix":"// before\nconst editor = createEditor({theme: {}});\nsetScrollableTablesActive(editor, true);\n// after\nconst editor = createEditor({\n  theme: {tableScrollableWrapper: 'table-scrollable-wrapper'},\n});\nsetScrollableTablesActive(editor, true);","handlingStrategy":"validation","validationCode":"if (enableScrollableTables && editor._config.theme.tableScrollableWrapper === undefined) {\n  throw new Error('theme.tableScrollableWrapper must be defined before setScrollableTablesActive(editor, true)');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Define tableScrollableWrapper in your theme whenever you enable horizontal table scroll.","Centralize your editor theme config and include all keys required by the extensions you enable.","Check the console in dev builds before shipping — most misconfig warnings are dev-only."],"tags":["console-warning","dev-only","table","theme","configuration"],"backgroundTag":"missing-theme-config","analyzedSha":"76a22dcba981b46119fcec45f935270707e26a57","analyzedAt":"2026-08-31T21:45:54.792Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}