@xuda.io/runtime-bundle 1.0.482 → 1.0.484

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.
@@ -30193,6 +30193,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
30193
30193
  if (!_ds) {
30194
30194
  continue;
30195
30195
  }
30196
+
30197
+ const update_xu_ref = async function () {
30198
+ let _ds_0 = _session.DS_GLB[0];
30199
+ for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
30200
+ if (val.ds.dsSession == dataSource) {
30201
+ func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
30202
+ }
30203
+ }
30204
+ };
30205
+
30196
30206
  // iterate changes records
30197
30207
  for (const [record_id, fields_data] of Object.entries(row_data)) {
30198
30208
  // iterate changes fields
@@ -30200,6 +30210,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
30200
30210
  // mechanism to make update directly on the datasource object
30201
30211
  if (record_id === 'datasource_main') {
30202
30212
  _.set(_ds, field_id, value);
30213
+ update_xu_ref();
30203
30214
  continue;
30204
30215
  }
30205
30216
 
@@ -30217,15 +30228,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
30217
30228
  await set_fieldComputed_dependencies(dataSource, field_id, null);
30218
30229
 
30219
30230
  // search the field in refs
30220
- let _ds_0 = _session.DS_GLB[0];
30221
- for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
30222
- if (val.ds.dsSession == dataSource) {
30223
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
30224
- // if (!fields_changed.includes(ref_name)) {
30225
- // fields_changed.push(ref_name);
30226
- // }
30227
- }
30228
- }
30231
+ update_xu_ref();
30232
+ // let _ds_0 = _session.DS_GLB[0];
30233
+ // for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
30234
+ // if (val.ds.dsSession == dataSource) {
30235
+ // func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
30236
+ // // if (!fields_changed.includes(ref_name)) {
30237
+ // // fields_changed.push(ref_name);
30238
+ // // }
30239
+ // }
30240
+ // }
30229
30241
 
30230
30242
  if (!update_local_scope_only) {
30231
30243
  let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);