@saltcorn/markup
Advanced tools
Comparing version 0.9.3-beta.7 to 0.9.3-beta.8
@@ -590,5 +590,15 @@ "use strict"; | ||
const in_repeat = !!field_name; | ||
const field0 = segment.field_name.includes(".") | ||
? form.fields.find((f) => f.name === repeat_name && f.isRepeat)?.fields.find((f) => f.name === field_name) | ||
: form.fields.find((f) => f.name === segment.field_name); | ||
const fields_match = segment.field_name.includes(".") | ||
? form.fields.find((f) => f.name === repeat_name && f.isRepeat)?.fields.filter((f) => f.name === field_name) | ||
: form.fields.filter((f) => f.name === segment.field_name); | ||
let field0; | ||
if (fields_match.length === 1) | ||
field0 = fields_match[0]; | ||
if (fields_match.length > 1) { | ||
const samefv = fields_match.find((f) => "fieldview" in f && f.fieldview === segment.fieldview); | ||
if (samefv) | ||
field0 = samefv; | ||
else | ||
field0 = fields_match[0]; | ||
} | ||
const repeater = in_repeat | ||
@@ -595,0 +605,0 @@ ? form.fields.find((f) => f.name === repeat_name) |
{ | ||
"name": "@saltcorn/markup", | ||
"version": "0.9.3-beta.7", | ||
"version": "0.9.3-beta.8", | ||
"description": "Markup for Saltcorn, open-source no-code platform", | ||
@@ -38,3 +38,3 @@ "homepage": "https://saltcorn.com", | ||
"devDependencies": { | ||
"@saltcorn/types": "0.9.3-beta.7", | ||
"@saltcorn/types": "0.9.3-beta.8", | ||
"@types/escape-html": "^1.0.1", | ||
@@ -41,0 +41,0 @@ "@types/jest": "^27.0.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
250209
3309