Tabs ยท console.warn
tabs: config.createHeadlessGrid must be the headless grid factory (a function); got {type}. It is ignored, so a tab that has never been activated shows no badge until it is.
Printed by Tabs, prefixed [lattice], since 1.59.0.
Warnings reference › tabs.createHeadlessGrid.type
- Identifier
tabs.createHeadlessGrid.type- Raised by
- Tabs
- Since
- 1.59.0
What happened
createHeadlessGrid was supplied but is not a function, so it was ignored entirely. It is an optional dependency and never fatal, but the symptom of its absence - badges that only appear once a tab is clicked - looks like a defect, which is why a wrong type is reported rather than passed over.
The fix
Pass the factory itself, not its module namespace and not a string.
The smallest fix
import { createHeadlessGrid } from '@toclocoinc/lattice-grid';
createTabs(el, { createGrid, createHeadlessGrid, tabs });
Reference
Covered in full at the API reference.