@shival99/z-ui 2.0.42 → 2.0.44
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.
|
@@ -4885,7 +4885,18 @@ class ZTableComponent {
|
|
|
4885
4885
|
if (isBodyConfig(col.body)) {
|
|
4886
4886
|
const actionConfig = this._getActionColumnConfig(col.body);
|
|
4887
4887
|
if (actionConfig) {
|
|
4888
|
-
|
|
4888
|
+
const actionKeys = Array.isArray(actionConfig.actions)
|
|
4889
|
+
? actionConfig.actions.map(action => action.key)
|
|
4890
|
+
: ['dynamic'];
|
|
4891
|
+
const schemaKey = JSON.stringify([
|
|
4892
|
+
col.id,
|
|
4893
|
+
col.size,
|
|
4894
|
+
col.minSize,
|
|
4895
|
+
col.maxSize,
|
|
4896
|
+
actionConfig.maxVisible ?? Z_TABLE_DEFAULT_MAX_VISIBLE_ACTIONS,
|
|
4897
|
+
actionKeys,
|
|
4898
|
+
]);
|
|
4899
|
+
return { columnId: col.id, config: actionConfig, schemaKey };
|
|
4889
4900
|
}
|
|
4890
4901
|
}
|
|
4891
4902
|
if (col.columns?.length) {
|
|
@@ -4901,9 +4912,10 @@ class ZTableComponent {
|
|
|
4901
4912
|
if (!actionCol) {
|
|
4902
4913
|
return null;
|
|
4903
4914
|
}
|
|
4904
|
-
|
|
4915
|
+
const previousValue = previous?.value;
|
|
4916
|
+
if (previousValue?.schemaKey === actionCol.schemaKey && (isPending || rows.length === 0)) {
|
|
4905
4917
|
return {
|
|
4906
|
-
...
|
|
4918
|
+
...previousValue,
|
|
4907
4919
|
config: actionCol.config,
|
|
4908
4920
|
};
|
|
4909
4921
|
}
|
|
@@ -4938,6 +4950,7 @@ class ZTableComponent {
|
|
|
4938
4950
|
return {
|
|
4939
4951
|
columnId: actionCol.columnId,
|
|
4940
4952
|
config: actionCol.config,
|
|
4953
|
+
schemaKey: actionCol.schemaKey,
|
|
4941
4954
|
width,
|
|
4942
4955
|
};
|
|
4943
4956
|
} });
|