@xuda.io/xuda-worker-bundle 1.3.1251 → 1.3.1252

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.
Files changed (2) hide show
  1. package/index.js +8 -12
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -4119,7 +4119,7 @@ func.datasource.update = async function (
4119
4119
  ).system_globals;
4120
4120
  }
4121
4121
 
4122
- let fieldComputed_datasource_changes = {};
4122
+
4123
4123
 
4124
4124
  const set_fieldComputed_dependencies = async function (dsNo, field_id, parent_ds) {
4125
4125
 
@@ -4154,18 +4154,14 @@ func.datasource.update = async function (
4154
4154
 
4155
4155
  if (!propExpressions) return
4156
4156
 
4157
- if (!fieldComputed_datasource_changes[dsSession]) {
4158
- fieldComputed_datasource_changes[dsSession] = {}
4159
- }
4157
+
4160
4158
  // iterate ds rows
4161
4159
  for (const row of _ds.data_feed?.rows || []) {
4162
4160
  // iterate row fields
4163
4161
  for (const [key, val] of Object.entries(row)) {
4164
4162
  if (key !== field_id) return
4165
4163
  try {
4166
- if (!fieldComputed_datasource_changes[dsSession][row._ROWID]) {
4167
- fieldComputed_datasource_changes[dsSession][row._ROWID] = {}
4168
- }
4164
+
4169
4165
  let ret = await func.expression.get(
4170
4166
  SESSION_ID,
4171
4167
  propExpressions,
@@ -4173,10 +4169,10 @@ func.datasource.update = async function (
4173
4169
  "update",
4174
4170
  row._ROWID
4175
4171
  );
4176
- fieldComputed_datasource_changes[dsSession][row._ROWID][field_id] = ret.result
4177
- // const row_idx = func.common.find_ROWID_idx(_ds, record_id);
4178
4172
 
4179
- // _ds.data_feed.rows[row_idx][field_id] = ret.result;
4173
+ const row_idx = func.common.find_ROWID_idx(_ds, row._ROWID);
4174
+
4175
+ _ds.data_feed.rows[row_idx][field_id] = ret.result;
4180
4176
  } catch (err) {
4181
4177
  console.error(err);
4182
4178
  }
@@ -4223,7 +4219,7 @@ func.datasource.update = async function (
4223
4219
  try {
4224
4220
  const row_idx = func.common.find_ROWID_idx(_ds, record_id);
4225
4221
  _ds.data_feed.rows[row_idx][field_id] = value;
4226
- // await set_fieldComputed_dependencies(dataSource, field_id, null)
4222
+ await set_fieldComputed_dependencies(dataSource, field_id, null)
4227
4223
 
4228
4224
  if (!update_local_scope_only) {
4229
4225
  let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);
@@ -4288,7 +4284,7 @@ func.datasource.update = async function (
4288
4284
  }
4289
4285
 
4290
4286
 
4291
- // let new_datasource_changes = { ...datasource_changes, ...fieldComputed_datasource_changes }
4287
+
4292
4288
 
4293
4289
 
4294
4290
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle",
3
- "version": "1.3.1251",
3
+ "version": "1.3.1252",
4
4
  "description": "xuda framework",
5
5
  "main": "index.js",
6
6
  "scripts": {