Detailed steps to reproduce the bug
We have a custom component with a subfield of type ‘list’, whose subfields are of type ‘number’, like…
{
name: 'field_1',
type: 'object',
subFields: [
{
name: 'field_1_1',
type: 'list',
subFields: [
{
name: 'field_1_1_1',
type: 'number',
required: true,
},
],
},
...
Sometimes the numeric values entered into these inputs in the Builder editor are received by our app’s code as strings, and sometimes as numbers, like…
[{ field_1_1_1: '1126' }, { field_1_1_1: 1129 }]
I would expect these to be received as numbers, given the ‘number’ type. Even receiving them as strings would be reasonable, what’s confusing is to receive some as numbers and some as strings.
The app is using @builder.io/react 3.2.7 .
I checked for weird invisible characters, but can’t find them. Eventually, after deleting the input value in the Builder editor and entering it again several times , it was finally received as a number.
What’s happening here? Is there a bug in how ‘number’ inputs are handled?