builder
builder copied to clipboard
CMS Data Model Object Type number key lookup
Describe the bug When creating a CMS Data Model with an object that has numbers as keys the data binding fails. It tries to access the data with:
state.dataModel.object.1
In this case it then returns the entire object and not the selected value.
To Reproduce Steps to reproduce the behavior:
- Create a CMS Data Model.
- Add an object field with a field that has a number key.
- Connect the model to your page and bind the object field anywhere.
Expected behavior I expect to be able to use number keys, that are used as a string to lookup the property.
This should work:
state.dataModel.object["1"]