@xuda.io/runtime-bundle 1.0.658 → 1.0.660
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/js/xuda-runtime-slim.js
CHANGED
|
@@ -12387,8 +12387,24 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12387
12387
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
|
|
12388
12388
|
|
|
12389
12389
|
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && val_is_reference_field) {
|
|
12390
|
-
let
|
|
12390
|
+
let arr_value_before_cast = (await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value;
|
|
12391
|
+
let value_from_getter = bind.getter($elm[0]);
|
|
12392
|
+
let value;
|
|
12393
|
+
if (arr_value_before_cast.includes(value_from_getter)) {
|
|
12394
|
+
value = arr_value_before_cast.filter((item) => item !== value_from_getter);
|
|
12395
|
+
} else {
|
|
12396
|
+
value.push(value_from_getter);
|
|
12397
|
+
}
|
|
12398
|
+
|
|
12399
|
+
let datasource_changes = {
|
|
12400
|
+
[_dsP]: {
|
|
12401
|
+
[_ds.currentRecordId]: {
|
|
12402
|
+
[bind_field_id]: value,
|
|
12403
|
+
},
|
|
12404
|
+
},
|
|
12405
|
+
};
|
|
12391
12406
|
debugger;
|
|
12407
|
+
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
12392
12408
|
}
|
|
12393
12409
|
|
|
12394
12410
|
var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));
|
|
@@ -10109,8 +10109,24 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10109
10109
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
|
|
10110
10110
|
|
|
10111
10111
|
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && val_is_reference_field) {
|
|
10112
|
-
let
|
|
10112
|
+
let arr_value_before_cast = (await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value;
|
|
10113
|
+
let value_from_getter = bind.getter($elm[0]);
|
|
10114
|
+
let value;
|
|
10115
|
+
if (arr_value_before_cast.includes(value_from_getter)) {
|
|
10116
|
+
value = arr_value_before_cast.filter((item) => item !== value_from_getter);
|
|
10117
|
+
} else {
|
|
10118
|
+
value.push(value_from_getter);
|
|
10119
|
+
}
|
|
10120
|
+
|
|
10121
|
+
let datasource_changes = {
|
|
10122
|
+
[_dsP]: {
|
|
10123
|
+
[_ds.currentRecordId]: {
|
|
10124
|
+
[bind_field_id]: value,
|
|
10125
|
+
},
|
|
10126
|
+
},
|
|
10127
|
+
};
|
|
10113
10128
|
debugger;
|
|
10129
|
+
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
10114
10130
|
}
|
|
10115
10131
|
|
|
10116
10132
|
var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));
|