Skip to content

A customDefaultValue settings can cause the builder to not be rendered correctly #6187

@llemire-exp

Description

@llemire-exp

Describe the bug
When inside the builder, when you have a datagrid with components that uses other components within the row with the customDefaultValue setting, if the property starts with an uppercase, an error is displayed within the console and the builder is not displayed correctly and becomes unusable

Version/Branch
@formio 5.0.1

To Reproduce
Steps to reproduce the behavior:

  1. Render the builder with an initial form that contains a customDefaultValue set to another row where its key starts with an uppercase letter

An example is provided in the Additional context section, the form contains a datagrid with 2 component: Quantity and New Quantity. the customDefaultValue of the component New Quantity is set to value = row.Quantity;

Expected behavior
The builder and customDefaultValue should work as expected

Screenshots
The builder normally (without customDefaultValue)

Image

The builder with customDefaultValue

Image

Additional context
Here is an html file containing the necessary code to reproduce the issue

formio-builder-datagrid-builder-bug.zip

Something to note: The problem can be fixed by setting the condition to value = row.quantity; (with a lower case letter) even if the key of the other component is Quantity.

Also I would still expect the builder to work normally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions