@isoftdata/svelte-table 2.6.4 → 2.6.5

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.
@@ -60,7 +60,7 @@ export class ColumnInfoRunicStore {
60
60
  }
61
61
  };
62
62
  getStoreValFromColumns(columns, storeValue) {
63
- return columns.reduce((acc, column) => {
63
+ const columnInfo = columns.reduce((acc, column) => {
64
64
  const storedColumn = storeValue
65
65
  ? this.getSerializableValuesWithDefaults(storeValue[column.property] ?? column)
66
66
  : // Fallback for initial load - if userWidth is undefined, it will be set on render
@@ -74,6 +74,11 @@ export class ColumnInfoRunicStore {
74
74
  acc[column.property] = newColumn;
75
75
  return acc;
76
76
  }, {});
77
+ const keyCount = Object.keys(columnInfo).length;
78
+ if (columns.length !== keyCount) {
79
+ console.warn(`ColumnInfoStore: The number of columns (${columns.length}) does not match the number of properties in the store (${keyCount}). This may be because you have multiple columns defined with the same property and will cause issues with rendering those columns.`);
80
+ }
81
+ return columnInfo;
77
82
  }
78
83
  /** Takes values from the given column, removes non-serializable values, and fills in with default serializable values */
79
84
  getSerializableValuesWithDefaults(column) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/svelte-table",
3
- "version": "2.6.4",
3
+ "version": "2.6.5",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",