@isoftdata/svelte-table 2.6.3 → 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.
package/dist/Td.svelte
CHANGED
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
{#if stopPropagation || enterGoesDown}
|
|
119
119
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
120
120
|
<span
|
|
121
|
-
onclick={e => e.stopPropagation()}
|
|
121
|
+
onclick={stopPropagation ? e => e.stopPropagation() : undefined}
|
|
122
122
|
{onkeypress}
|
|
123
123
|
>
|
|
124
124
|
{@render children?.()}
|
|
@@ -60,7 +60,7 @@ export class ColumnInfoRunicStore {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
getStoreValFromColumns(columns, storeValue) {
|
|
63
|
-
|
|
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) {
|