@xuda.io/runtime-bundle 1.0.672 → 1.0.674
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.
|
@@ -32076,7 +32076,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32076
32076
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
|
|
32077
32077
|
|
|
32078
32078
|
// update array for checkbox that not in xu-for
|
|
32079
|
-
if (field_prop.props.fieldType === 'array' &&
|
|
32079
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && val_is_reference_field) {
|
|
32080
32080
|
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
32081
32081
|
let value_from_getter = bind.getter($elm[0]);
|
|
32082
32082
|
let value;
|
|
@@ -32098,6 +32098,29 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32098
32098
|
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
32099
32099
|
}
|
|
32100
32100
|
|
|
32101
|
+
// update array for checkbox that not in xu-for
|
|
32102
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && val_is_reference_field) {
|
|
32103
|
+
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
32104
|
+
let value_from_getter = bind.getter($elm[0]);
|
|
32105
|
+
// let value;
|
|
32106
|
+
// if (arr_value_before_cast.includes(value_from_getter)) {
|
|
32107
|
+
// value = arr_value_before_cast.filter((item) => !_.isEqual(item, value_from_getter));
|
|
32108
|
+
// } else {
|
|
32109
|
+
// arr_value_before_cast.push(value_from_getter);
|
|
32110
|
+
// value = arr_value_before_cast;
|
|
32111
|
+
// }
|
|
32112
|
+
|
|
32113
|
+
let datasource_changes = {
|
|
32114
|
+
[_dsP]: {
|
|
32115
|
+
[_ds.currentRecordId]: {
|
|
32116
|
+
[bind_field_id]: [value_from_getter],
|
|
32117
|
+
},
|
|
32118
|
+
},
|
|
32119
|
+
};
|
|
32120
|
+
|
|
32121
|
+
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
32122
|
+
}
|
|
32123
|
+
|
|
32101
32124
|
var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));
|
|
32102
32125
|
|
|
32103
32126
|
if (field_prop.props.fieldType === 'object' && !val_is_reference_field) {
|
|
@@ -32163,13 +32186,21 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32163
32186
|
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
32164
32187
|
value = _ds.data_feed.rows?.[row_idx]?.[val.value];
|
|
32165
32188
|
}
|
|
32166
|
-
if (field_prop.props.fieldType === 'array' &&
|
|
32189
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && $elm.attr('value')) {
|
|
32167
32190
|
if (value.includes($elm.attr('value'))) {
|
|
32168
32191
|
value = true;
|
|
32169
32192
|
} else {
|
|
32170
32193
|
value = false;
|
|
32171
32194
|
}
|
|
32172
32195
|
}
|
|
32196
|
+
|
|
32197
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && $elm.attr('value')) {
|
|
32198
|
+
if (value.includes($elm.attr('value'))) {
|
|
32199
|
+
value = $elm.attr('value');
|
|
32200
|
+
} else {
|
|
32201
|
+
value = false;
|
|
32202
|
+
}
|
|
32203
|
+
}
|
|
32173
32204
|
} else {
|
|
32174
32205
|
value = val.value;
|
|
32175
32206
|
}
|