formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

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

Open llemire-exp opened this issue 5 months ago • 1 comments

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

llemire-exp avatar Jul 15 '25 17:07 llemire-exp

I work with @llemire-exp and I would like to specify that in the formio playground, the list of components is still visible compared to the sample provided. In the sample, the list of components becomes hidden.

pboucher1960 avatar Jul 15 '25 18:07 pboucher1960