@helpwave/hightide 0.6.9 → 0.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -13355,17 +13355,20 @@ import clsx27 from "clsx";
13355
13355
  import { jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
13356
13356
  var TableBody = React5.memo(function TableBodyVisual() {
13357
13357
  const { table, onRowClick, onFillerRowClick, isUsingFillerRows, fillerRowCell, pagination, rows } = useTableDataContext();
13358
- const pinnedColumnsLeft = table.getState().columnPinning?.left ?? [];
13359
- const pinnedColumnsRight = table.getState().columnPinning?.right ?? [];
13360
- let columnOrder = table.getState().columnOrder;
13361
- columnOrder = [...pinnedColumnsLeft, ...columnOrder.filter((id) => !pinnedColumnsLeft.includes(id) && !pinnedColumnsRight.includes(id)), ...pinnedColumnsRight];
13362
- const columnVisibility = table.getState().columnVisibility;
13363
- const columns = columnOrder.map((id) => {
13364
- const column = table.getColumn(id);
13365
- if (!column) return null;
13366
- if (columnVisibility[id] === false) return null;
13367
- return column;
13368
- }).filter(Boolean);
13358
+ const state = table.getState();
13359
+ const baseOrder = state.columnOrder?.length ? state.columnOrder : table.getVisibleLeafColumns().map((col) => col.id);
13360
+ const pinnedLeft = state.columnPinning?.left ?? [];
13361
+ const pinnedRight = state.columnPinning?.right ?? [];
13362
+ const columnOrder = [
13363
+ ...pinnedLeft,
13364
+ ...baseOrder.filter(
13365
+ (id) => !pinnedLeft.includes(id) && !pinnedRight.includes(id)
13366
+ ),
13367
+ ...pinnedRight
13368
+ ];
13369
+ const columns = columnOrder.map((id) => table.getColumn(id)).filter(
13370
+ (col) => !!col && state.columnVisibility?.[col.id] !== false
13371
+ );
13369
13372
  return /* @__PURE__ */ jsxs27("tbody", { children: [
13370
13373
  rows.map((row) => {
13371
13374
  return /* @__PURE__ */ jsx56(