When using the useTable hook in AnalyticalTable, the order in which you pass plugins is critical because hooks accumulate properties and state through a pipeline. useTable automatically prepends useColumnVisibility to your plugin list.
To ensure correct behavior, follow this effective execution order:
- Vendored
react-table plugins: These should generally come first (e.g., useFilters, useGlobalFilter, useColumnOrder, useGroupBy, useSortBy, useExpanded). - UI5WCR
useRowSelect: This is a specialized fork that replaces the upstream react-table version. - UI5WCR Internal Hooks: These provide core functionality like resizing, selection, and accessibility. They must follow the order specified in the documentation to avoid state conflicts.
- User-provided plugins: These should be passed LAST. Adding plugins at the beginning or middle can clobber the logic of prior hooks in the pipeline.
useTable(
config,
// 1. Vendored react-table plugins
useFilters,
useGlobalFilter,
useColumnOrder,
useGroupBy,
useSortBy,
useExpanded,
// 2. UI5WCR fork
useRowSelect,
// 3. UI5WCR internal hooks
useColumnResizing,
useColumnsDeps,
useRowSelectionColumn,
useAutoResize,
useSingleRowStateSelection,
useSelectionChangeCallback,
useRowHighlight,
useRowNavigationIndicators,
useDynamicColumnWidths,
useStyling,
useToggleRowExpand,
useA11y,
usePopIn,
useVisibleColumnsWidth,
useKeyboardNavigation,
useColumnDragAndDrop,
// 4. User-provided plugins (LAST)
...tableHooks
);