@xuda.io/runtime-bundle 1.0.1311 → 1.0.1313

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.
@@ -28181,8 +28181,9 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
28181
28181
 
28182
28182
  // Notify of change
28183
28183
  if (oldValue !== value) {
28184
+ let cleanPath = currentPath.shift();
28184
28185
  onChange({
28185
- path: currentPath.join('.'),
28186
+ path: cleanPath.join('.'),
28186
28187
  oldValue,
28187
28188
  newValue: value,
28188
28189
  type: 'set',
@@ -28222,10 +28223,10 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
28222
28223
  return proxy;
28223
28224
  }
28224
28225
 
28225
- return createProxy({ _ref: obj });
28226
+ return createProxy(obj);
28226
28227
  }
28227
28228
 
28228
- const watchedUser = createWatchedObject(_ds, async (change) => {
28229
+ const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
28229
28230
  // console.log('Change detected:', change);
28230
28231
  const { path, newValue } = change;
28231
28232
  try {
@@ -28242,7 +28243,7 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
28242
28243
 
28243
28244
  //////////////
28244
28245
 
28245
- let obj = { ds: _ds, data: {}, props: _ds.in_parameters || {}, watcher: watchedUser };
28246
+ let obj = { ds: watchedDs._ref, data: {}, props: _ds.in_parameters || {} };
28246
28247
  try {
28247
28248
  const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
28248
28249
  obj.data = _ds?.data_feed?.rows?.[row_idx];