@xuda.io/runtime-bundle 1.0.657 → 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.
|
@@ -32066,6 +32066,27 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32066
32066
|
|
|
32067
32067
|
const field_changed = async function (e) {
|
|
32068
32068
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
|
|
32069
|
+
|
|
32070
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && val_is_reference_field) {
|
|
32071
|
+
let arr_value_before_cast = (await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value;
|
|
32072
|
+
let value_from_getter = bind.getter($elm[0]);
|
|
32073
|
+
let value;
|
|
32074
|
+
if (arr_value_before_cast.includes(value_from_getter)) {
|
|
32075
|
+
value = arr_value_before_cast.filter((item) => item !== value_from_getter);
|
|
32076
|
+
} else {
|
|
32077
|
+
}
|
|
32078
|
+
|
|
32079
|
+
let datasource_changes = {
|
|
32080
|
+
[_dsP]: {
|
|
32081
|
+
[_ds.currentRecordId]: {
|
|
32082
|
+
[bind_field_id]: value,
|
|
32083
|
+
},
|
|
32084
|
+
},
|
|
32085
|
+
};
|
|
32086
|
+
debugger;
|
|
32087
|
+
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
32088
|
+
}
|
|
32089
|
+
|
|
32069
32090
|
var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));
|
|
32070
32091
|
|
|
32071
32092
|
if (field_prop.props.fieldType === 'object' && !val_is_reference_field) {
|
|
@@ -32131,7 +32152,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32131
32152
|
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
32132
32153
|
value = _ds.data_feed.rows?.[row_idx]?.[val.value];
|
|
32133
32154
|
}
|
|
32134
|
-
if (
|
|
32155
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && $elm.attr('value')) {
|
|
32135
32156
|
if (value.includes($elm.attr('value'))) {
|
|
32136
32157
|
value = true;
|
|
32137
32158
|
} else {
|