@xuda.io/runtime-bundle 1.0.658 → 1.0.659

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.
@@ -12387,8 +12387,23 @@ 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 value_before_cast = await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId);
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
+ }
12397
+
12398
+ let datasource_changes = {
12399
+ [_dsP]: {
12400
+ [_ds.currentRecordId]: {
12401
+ [bind_field_id]: value,
12402
+ },
12403
+ },
12404
+ };
12391
12405
  debugger;
12406
+ return await func.datasource.update(SESSION_ID, datasource_changes);
12392
12407
  }
12393
12408
 
12394
12409
  var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));
@@ -10109,8 +10109,23 @@ 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 value_before_cast = await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId);
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
+ }
10119
+
10120
+ let datasource_changes = {
10121
+ [_dsP]: {
10122
+ [_ds.currentRecordId]: {
10123
+ [bind_field_id]: value,
10124
+ },
10125
+ },
10126
+ };
10113
10127
  debugger;
10128
+ return await func.datasource.update(SESSION_ID, datasource_changes);
10114
10129
  }
10115
10130
 
10116
10131
  var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));