@byteluck-fe/runtime-desktop-controls 7.0.0-beta.48 → 7.0.0-beta.49
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.
|
@@ -13434,6 +13434,9 @@ const uG = Object.freeze([
|
|
|
13434
13434
|
isCopy(e) {
|
|
13435
13435
|
return e === "copy";
|
|
13436
13436
|
},
|
|
13437
|
+
isEmptyValue(e) {
|
|
13438
|
+
return e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
13439
|
+
},
|
|
13437
13440
|
setClearValueFieldCode(e) {
|
|
13438
13441
|
switch (e.type) {
|
|
13439
13442
|
case "employee":
|
|
@@ -13447,7 +13450,8 @@ const uG = Object.freeze([
|
|
|
13447
13450
|
case "department2":
|
|
13448
13451
|
(e.props.defaultValueType === "current" || e.props.defaultValueType === "current_dept_id") && this.clearValueFieldCodeStates.push({
|
|
13449
13452
|
dataCode: e.props.dataBind.dataCode,
|
|
13450
|
-
fieldCode: e.props.dataBind.fieldCode
|
|
13453
|
+
fieldCode: e.props.dataBind.fieldCode,
|
|
13454
|
+
clearOnlyWhenEmpty: !0
|
|
13451
13455
|
});
|
|
13452
13456
|
break;
|
|
13453
13457
|
case "date-picker":
|
|
@@ -13466,8 +13470,8 @@ const uG = Object.freeze([
|
|
|
13466
13470
|
resetDataSet(e) {
|
|
13467
13471
|
this.clearValueFieldCodeStates.map((t) => {
|
|
13468
13472
|
e[t.dataCode] && (Array.isArray(e[t.dataCode]) ? e[t.dataCode].map((n) => {
|
|
13469
|
-
delete n[t.fieldCode];
|
|
13470
|
-
}) : delete e[t.dataCode][t.fieldCode]);
|
|
13473
|
+
(!t.clearOnlyWhenEmpty || this.isEmptyValue(n[t.fieldCode])) && delete n[t.fieldCode];
|
|
13474
|
+
}) : (!t.clearOnlyWhenEmpty || this.isEmptyValue(e[t.dataCode][t.fieldCode])) && delete e[t.dataCode][t.fieldCode]);
|
|
13471
13475
|
}), Object.keys(e).map((t) => {
|
|
13472
13476
|
delete e[t].uid;
|
|
13473
13477
|
});
|