@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.
@@ -3485,6 +3485,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3485
3485
  if (!_ds) {
3486
3486
  continue;
3487
3487
  }
3488
+
3489
+ const update_xu_ref = async function () {
3490
+ let _ds_0 = _session.DS_GLB[0];
3491
+ for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3492
+ if (val.ds.dsSession == dataSource) {
3493
+ func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3494
+ }
3495
+ }
3496
+ };
3497
+
3488
3498
  // iterate changes records
3489
3499
  for (const [record_id, fields_data] of Object.entries(row_data)) {
3490
3500
  // iterate changes fields
@@ -3492,6 +3502,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3492
3502
  // mechanism to make update directly on the datasource object
3493
3503
  if (record_id === 'datasource_main') {
3494
3504
  _.set(_ds, field_id, value);
3505
+ update_xu_ref();
3495
3506
  continue;
3496
3507
  }
3497
3508
 
@@ -3509,15 +3520,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3509
3520
  await set_fieldComputed_dependencies(dataSource, field_id, null);
3510
3521
 
3511
3522
  // search the field in refs
3512
- let _ds_0 = _session.DS_GLB[0];
3513
- for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3514
- if (val.ds.dsSession == dataSource) {
3515
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3516
- // if (!fields_changed.includes(ref_name)) {
3517
- // fields_changed.push(ref_name);
3518
- // }
3519
- }
3520
- }
3523
+ update_xu_ref();
3524
+ // let _ds_0 = _session.DS_GLB[0];
3525
+ // for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3526
+ // if (val.ds.dsSession == dataSource) {
3527
+ // func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3528
+ // // if (!fields_changed.includes(ref_name)) {
3529
+ // // fields_changed.push(ref_name);
3530
+ // // }
3531
+ // }
3532
+ // }
3521
3533
 
3522
3534
  if (!update_local_scope_only) {
3523
3535
  let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);
@@ -3485,6 +3485,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3485
3485
  if (!_ds) {
3486
3486
  continue;
3487
3487
  }
3488
+
3489
+ const update_xu_ref = async function () {
3490
+ let _ds_0 = _session.DS_GLB[0];
3491
+ for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3492
+ if (val.ds.dsSession == dataSource) {
3493
+ func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3494
+ }
3495
+ }
3496
+ };
3497
+
3488
3498
  // iterate changes records
3489
3499
  for (const [record_id, fields_data] of Object.entries(row_data)) {
3490
3500
  // iterate changes fields
@@ -3492,6 +3502,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3492
3502
  // mechanism to make update directly on the datasource object
3493
3503
  if (record_id === 'datasource_main') {
3494
3504
  _.set(_ds, field_id, value);
3505
+ update_xu_ref();
3495
3506
  continue;
3496
3507
  }
3497
3508
 
@@ -3509,15 +3520,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3509
3520
  await set_fieldComputed_dependencies(dataSource, field_id, null);
3510
3521
 
3511
3522
  // search the field in refs
3512
- let _ds_0 = _session.DS_GLB[0];
3513
- for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3514
- if (val.ds.dsSession == dataSource) {
3515
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3516
- // if (!fields_changed.includes(ref_name)) {
3517
- // fields_changed.push(ref_name);
3518
- // }
3519
- }
3520
- }
3523
+ update_xu_ref();
3524
+ // let _ds_0 = _session.DS_GLB[0];
3525
+ // for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3526
+ // if (val.ds.dsSession == dataSource) {
3527
+ // func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3528
+ // // if (!fields_changed.includes(ref_name)) {
3529
+ // // fields_changed.push(ref_name);
3530
+ // // }
3531
+ // }
3532
+ // }
3521
3533
 
3522
3534
  if (!update_local_scope_only) {
3523
3535
  let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);