@undevy-org/tablewright 0.7.5 → 0.7.6
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.
|
@@ -45,7 +45,7 @@ function shouldPreserveMultiSubOnApply(sub, subCommitted, touchKey, touched) {
|
|
|
45
45
|
function mergeCompoundValueForApply(config, fieldId, committed, draft, touched, hiddenSubSet) {
|
|
46
46
|
const committedCompound = getCompoundValue(committed);
|
|
47
47
|
const draftCompound = getCompoundValue(draft);
|
|
48
|
-
const merged = {};
|
|
48
|
+
const merged = { ...draftCompound };
|
|
49
49
|
for (const sub of config.subFilters ?? []) {
|
|
50
50
|
if (hiddenSubSet.has(compoundSubTouchKey(fieldId, sub.key))) continue;
|
|
51
51
|
const touchKey = compoundSubTouchKey(fieldId, sub.key);
|
|
@@ -60,6 +60,12 @@ function mergeCompoundValueForApply(config, fieldId, committed, draft, touched,
|
|
|
60
60
|
if (subDraft === void 0 || isFilterValueEmpty(subDraft)) continue;
|
|
61
61
|
merged[sub.key] = subDraft;
|
|
62
62
|
}
|
|
63
|
+
for (const key of Object.keys(merged)) {
|
|
64
|
+
const value = merged[key];
|
|
65
|
+
if (isFilterValueEmpty(value)) {
|
|
66
|
+
delete merged[key];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
63
69
|
return Object.keys(merged).length === 0 ? void 0 : merged;
|
|
64
70
|
}
|
|
65
71
|
function resolveFieldApplyChange(config, fieldId, committed, draft, touched, hiddenSubSet, isActive) {
|
package/dist/tablewright.cjs
CHANGED
|
@@ -4083,7 +4083,7 @@ function shouldPreserveMultiSubOnApply(sub, subCommitted, touchKey, touched) {
|
|
|
4083
4083
|
function mergeCompoundValueForApply(config, fieldId, committed, draft, touched, hiddenSubSet) {
|
|
4084
4084
|
const committedCompound = getCompoundValue(committed);
|
|
4085
4085
|
const draftCompound = getCompoundValue(draft);
|
|
4086
|
-
const merged = {};
|
|
4086
|
+
const merged = { ...draftCompound };
|
|
4087
4087
|
for (const sub of config.subFilters ?? []) {
|
|
4088
4088
|
if (hiddenSubSet.has(compoundSubTouchKey(fieldId, sub.key))) continue;
|
|
4089
4089
|
const touchKey = compoundSubTouchKey(fieldId, sub.key);
|
|
@@ -4098,6 +4098,12 @@ function mergeCompoundValueForApply(config, fieldId, committed, draft, touched,
|
|
|
4098
4098
|
if (subDraft === void 0 || isFilterValueEmpty(subDraft)) continue;
|
|
4099
4099
|
merged[sub.key] = subDraft;
|
|
4100
4100
|
}
|
|
4101
|
+
for (const key of Object.keys(merged)) {
|
|
4102
|
+
const value = merged[key];
|
|
4103
|
+
if (isFilterValueEmpty(value)) {
|
|
4104
|
+
delete merged[key];
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4101
4107
|
return Object.keys(merged).length === 0 ? void 0 : merged;
|
|
4102
4108
|
}
|
|
4103
4109
|
function resolveFieldApplyChange(config, fieldId, committed, draft, touched, hiddenSubSet, isActive) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@undevy-org/tablewright",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "React data-table and application-shell components: filters, drawers, row controls, sortable and resizable columns, built on Radix UI and TanStack Table.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|