facebook/lexical · warning
TableNode: hasHorizontalScroll is active but theme.tableScro
Error message
TableNode: hasHorizontalScroll is active but theme.tableScrollableWrapper is not defined.
What it means
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.
Source
Thrown at packages/lexical-table/src/LexicalTableNode.ts:361
editor,
'@lexical/table/Table',
);
// peek() so a reconcile that runs inside a signals effect (e.g. via a
// discrete update or force-commit read) does not subscribe that effect to
// the table config; re-rendering on change is the TableExtension's job.
return dep
? dep.output.hasStickyScrollbar.peek() &&
dep.output.hasHorizontalScroll.peek()
: false;
}
export function setScrollableTablesActive(
editor: LexicalEditor,
active: boolean,
): void {
if (active) {
if (__DEV__ && editor._config.theme.tableScrollableWrapper === undefined) {
console.warn(
'TableNode: hasHorizontalScroll is active but theme.tableScrollableWrapper is not defined.',
);
}
scrollableEditors.add(editor);
} else {
scrollableEditors.delete(editor);
}
}
/** @noInheritDoc */
export class TableNode extends ElementNode {
/** @internal */
__rowStriping: boolean = false;
__frozenColumnCount: number = 0;
__frozenRowCount: number = 0;
// Initialized unconditionally (not `__colWidths?: ...`) so a freshly
// constructed instance always has the own property — `@lexical/yjs` derives a
// node's syncable properties from `Object.keys(new Klass())`, so anView on GitHub (pinned to 76a22dcba9)
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.
Example fix
// before
const editor = createEditor({theme: {}});
setScrollableTablesActive(editor, true);
// after
const editor = createEditor({
theme: {tableScrollableWrapper: 'table-scrollable-wrapper'},
});
setScrollableTablesActive(editor, true); Defensive patterns
Strategy: validation
Validate before calling
if (enableScrollableTables && editor._config.theme.tableScrollableWrapper === undefined) {
throw new Error('theme.tableScrollableWrapper must be defined before setScrollableTablesActive(editor, true)');
} Prevention
- 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.
When it happens
Trigger: Calling setScrollableTablesActive(editor, true) (directly, or via TablePlugin/register paths that enable hasHorizontalScroll) while editor._config.theme.tableScrollableWrapper is undefined.
Common situations: Enabling table horizontal scroll (TablePlugin hasHorizontalScroll option) without adding tableScrollableWrapper to the editor theme; copying a config from docs that omits the theme key.
Related errors
- [lexical] duplicate DOMImportRule name "${rule.name}" — keep
- message
- CodeHighlightPlugin: CodeNode or CodeHighlightNode not regis
- CodeHighlightPlugin: CodeNode or CodeHighlightNode not regis
- Cell not found in table.
AI-assisted analysis of facebook/lexical@76a22dcba9 (2026-08-31).
Data as JSON: /api/errors/d1a4a356388200bf.
Report an issue: GitHub.