Skip to content

Commit

Permalink
fix(TableSettings): pass new meta for settings with actions column
Browse files Browse the repository at this point in the history
  • Loading branch information
tapo4ek committed Oct 23, 2024
1 parent 466d470 commit e71ee3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/TableSettings/TableSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const TableSettings = <TData extends unknown>({
return headers.reduce<Record<string, Header<TData, unknown>>>((acc, header) => {
const result = {...acc};
result[header.column.id] = header;
return acc;
return result;
}, {});
}, [headers]);

Expand Down
3 changes: 2 additions & 1 deletion src/constants/settingsWithActionsColumn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ export const getSettingsWithActionsColumn = <TData extends unknown>(
},
): ColumnDef<TData> => {
const {cell} = getActionsColumn<TData>(columnId, options.actions);
const {header} = getSettingsColumn<TData>(columnId, options.settings);
const {header, meta} = getSettingsColumn<TData>(columnId, options.settings);
return {
id: columnId,
size: SETTINGS_WITH_ACTIONS_COLUMN_SIZE,
minSize: SETTINGS_WITH_ACTIONS_COLUMN_SIZE,
cell,
header,
meta,
};
};

0 comments on commit e71ee3e

Please sign in to comment.