Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOUR-17261: When the calc has bypass activated, the content of the entire form is not displayed #1653

Merged
merged 4 commits into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/mixins/Json2Vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,11 @@ export default {
return name && typeof name === 'string' && name.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/);
},
isComputedVariable(name, definition) {
return definition.computed && definition.computed.some(computed => {
// Check if the first part of an element's name (up to the first `.`)
// matches the name of a computed property.
return definition?.computed?.some(computed => {
// add byPass computed property validation
if (computed?.byPass) return false;
// Check if the first part of an element'ßs name (up to the first `.`)
// matches the name of a computed propertåy.
const regex = new RegExp(`^${computed.property}(\\.|$)`, 'i');
return regex.test(name);
});
Expand Down
Loading