@formio/js 5.1.0-dev.5892.54c1dc7 → 5.1.0-dev.5936.81a1533

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.
@@ -199,15 +199,7 @@ export function checkSimpleConditional(component, condition, row, data, instance
199
199
  return true;
200
200
  }
201
201
  const splittedConditionPath = conditionComponentPath.split('.');
202
- const checkParentTypeInTree = (instance, componentType) => {
203
- if (!instance?.parent) {
204
- return false;
205
- }
206
- return instance?.parent.type === componentType || checkParentTypeInTree(instance.parent, componentType);
207
- };
208
- const conditionalPaths = checkParentTypeInTree(instance, 'datagrid') || checkParentTypeInTree(instance, 'editgrid')
209
- ? []
210
- : getConditionalPathsRecursive(splittedConditionPath, data);
202
+ const conditionalPaths = instance?.parent?.type === 'datagrid' || instance?.parent?.type === 'editgrid' ? [] : getConditionalPathsRecursive(splittedConditionPath, data);
211
203
  if (conditionalPaths.length > 0) {
212
204
  return conditionalPaths.map((path) => {
213
205
  const value = getComponentActualValue(path, data, row);
@@ -321,7 +313,7 @@ function getRow(component, row, instance, conditional) {
321
313
  }
322
314
  const dataParent = getDataParentComponent(instance);
323
315
  if (dataParent) {
324
- const parentPath = dataParent.paths?.localPath;
316
+ const parentPath = dataParent.paths?.localDataPath;
325
317
  const isTriggerCondtionComponentPath = condition.when || !condition.conditions
326
318
  ? condition.when?.startsWith(dataParent.paths?.localPath)
327
319
  : _.some(condition.conditions, cond => cond.component.startsWith(dataParent.paths?.localPath));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.5892.54c1dc7",
3
+ "version": "5.1.0-dev.5936.81a1533",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {