Architecture Deep Dive
Layer Design
text
Application
└── TableProvider (Layer 2)
└── DataTable / ClientSideTable (Layer 3)
└── useResolvedTableConfig (merges L1–L4)
├── Toolbar
├── Table
└── PaginationConfig Resolution Flow
text
DEFAULT_TABLE_CONFIG
→ deepMergeConfig(defaultConfig, providerConfig)
→ deepMergeConfig(mergedConfig, instanceConfig)
→ plugin loop (sorted by priority)
→ runDevValidation()
→ Final resolved TableConfigRender Lifecycle
text
DataTable mount
→ useResolvedTableConfig()
→ useTableTranslations()
→ Read URL params
→ useReactTable()
→ Render Toolbar
├── View toggle
├── Search
├── Buttons
└── Filter row
→ Render Main Content
├── Card view
└── Table view
→ Render Pagination
→ Render Floating BarFeature Engine Layering
Features in the table system are controlled at three distinct levels, each capable of overriding the one before it:
- Config layer —
features.*booleans declared inDEFAULT_TABLE_CONFIG, theTableProviderconfig, or instance-level config determine which capabilities are enabled globally or per-instance. - Prop layer — Instance props passed directly to
DataTableorClientSideTablecan override any config-level feature flag at render time without modifying shared config. - Render layer — Conditional JSX inside components reads the resolved config and props to decide what to render, keeping the output tree minimal when features are disabled.
tsx
// Conditional rendering pattern
const resolvedConfig = useResolvedTableConfig(instanceConfig);
return (
<>
{resolvedConfig.features.search && <SearchInput />}
{resolvedConfig.features.pagination && <Pagination />}
{resolvedConfig.features.floatingBar && <FloatingBar />}
</>
);Component Dependency Graph
text
ClientSideTable
└── DataTable
├── DataTableToolbar
│ ├── DataTableViewOptions
│ ├── DataTableSearchInput
│ ├── DataTableActionButtons
│ └── DataTableFilterRow
├── DataTableAdvancedToolbar
├── DataTableMobileToolbar
├── DataTableCardView
├── Table
│ └── DataTableColumnHeader
├── DataTablePagination
└── DataTableFloatingBarExtensibility Model
- Config system — Provide a partial config to
TableProvideror directly to a table instance to override any default behaviour without forking components. - Custom buttons — Pass an array of button definitions via the
actionButtonsprop to inject arbitrary toolbar actions alongside the built-in ones. - Custom cell renderers — Column definitions accept any React node as a
cellrenderer, giving full control over how individual cells are displayed. - Plugin system — Plugins are sorted by priority and applied during config resolution, allowing third-party or application- level logic to transform the final config before render.
- Translation function — Supply a custom
tfunction through config orTableProviderto integrate with any i18n library without coupling the table internals to a specific solution. - Component composition — All sub-components are exported and can be assembled manually outside of
DataTablewhen the default layout does not fit the application's needs.