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