@xuda.io/runtime-bundle 1.0.673 → 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.
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -12395,7 +12395,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12395
12395
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
|
|
12396
12396
|
|
|
12397
12397
|
// update array for checkbox that not in xu-for
|
|
12398
|
-
if (field_prop.props.fieldType === 'array' &&
|
|
12398
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && val_is_reference_field) {
|
|
12399
12399
|
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
12400
12400
|
let value_from_getter = bind.getter($elm[0]);
|
|
12401
12401
|
let value;
|
|
@@ -12417,6 +12417,29 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12417
12417
|
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
12418
12418
|
}
|
|
12419
12419
|
|
|
12420
|
+
// update array for checkbox that not in xu-for
|
|
12421
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && val_is_reference_field) {
|
|
12422
|
+
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
12423
|
+
let value_from_getter = bind.getter($elm[0]);
|
|
12424
|
+
// let value;
|
|
12425
|
+
// if (arr_value_before_cast.includes(value_from_getter)) {
|
|
12426
|
+
// value = arr_value_before_cast.filter((item) => !_.isEqual(item, value_from_getter));
|
|
12427
|
+
// } else {
|
|
12428
|
+
// arr_value_before_cast.push(value_from_getter);
|
|
12429
|
+
// value = arr_value_before_cast;
|
|
12430
|
+
// }
|
|
12431
|
+
|
|
12432
|
+
let datasource_changes = {
|
|
12433
|
+
[_dsP]: {
|
|
12434
|
+
[_ds.currentRecordId]: {
|
|
12435
|
+
[bind_field_id]: [value_from_getter],
|
|
12436
|
+
},
|
|
12437
|
+
},
|
|
12438
|
+
};
|
|
12439
|
+
|
|
12440
|
+
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
12441
|
+
}
|
|
12442
|
+
|
|
12420
12443
|
var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));
|
|
12421
12444
|
|
|
12422
12445
|
if (field_prop.props.fieldType === 'object' && !val_is_reference_field) {
|
|
@@ -10117,7 +10117,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10117
10117
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
|
|
10118
10118
|
|
|
10119
10119
|
// update array for checkbox that not in xu-for
|
|
10120
|
-
if (field_prop.props.fieldType === 'array' &&
|
|
10120
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && val_is_reference_field) {
|
|
10121
10121
|
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
10122
10122
|
let value_from_getter = bind.getter($elm[0]);
|
|
10123
10123
|
let value;
|
|
@@ -10139,6 +10139,29 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10139
10139
|
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
10140
10140
|
}
|
|
10141
10141
|
|
|
10142
|
+
// update array for checkbox that not in xu-for
|
|
10143
|
+
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && val_is_reference_field) {
|
|
10144
|
+
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
10145
|
+
let value_from_getter = bind.getter($elm[0]);
|
|
10146
|
+
// let value;
|
|
10147
|
+
// if (arr_value_before_cast.includes(value_from_getter)) {
|
|
10148
|
+
// value = arr_value_before_cast.filter((item) => !_.isEqual(item, value_from_getter));
|
|
10149
|
+
// } else {
|
|
10150
|
+
// arr_value_before_cast.push(value_from_getter);
|
|
10151
|
+
// value = arr_value_before_cast;
|
|
10152
|
+
// }
|
|
10153
|
+
|
|
10154
|
+
let datasource_changes = {
|
|
10155
|
+
[_dsP]: {
|
|
10156
|
+
[_ds.currentRecordId]: {
|
|
10157
|
+
[bind_field_id]: [value_from_getter],
|
|
10158
|
+
},
|
|
10159
|
+
},
|
|
10160
|
+
};
|
|
10161
|
+
|
|
10162
|
+
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
10163
|
+
}
|
|
10164
|
+
|
|
10142
10165
|
var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));
|
|
10143
10166
|
|
|
10144
10167
|
if (field_prop.props.fieldType === 'object' && !val_is_reference_field) {
|