@tanstack/react-table 8.5.1 → 8.5.2

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.
@@ -2937,8 +2937,20 @@ function createTable(options) {
2937
2937
 
2938
2938
  defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
2939
2939
  return {
2940
- header: props => props.header.column.id,
2941
- footer: props => props.header.column.id,
2940
+ header: props => {
2941
+ const resolvedColumnDef = props.header.column.columnDef;
2942
+
2943
+ if (resolvedColumnDef.accessorKey) {
2944
+ return resolvedColumnDef.accessorKey;
2945
+ }
2946
+
2947
+ if (resolvedColumnDef.accessorFn) {
2948
+ return resolvedColumnDef.id;
2949
+ }
2950
+
2951
+ return null;
2952
+ },
2953
+ // footer: props => props.header.column.id,
2942
2954
  cell: props => {
2943
2955
  var _props$renderValue$to, _props$renderValue;
2944
2956