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