[Bug]: Select Widget issue for dynamic Label/Key with JS Toggle #38235
Labels
Bug
Something isn't working
Medium
Issues that frustrate users due to poor UX
Needs Triaging
Needs attention from maintainers to triage
Production
Select Widget
Select or dropdown widget
Widgets & Accelerators Pod
Issues related to widgets & Accelerators
Widgets Product
This label groups issues related to widgets
Is there an existing issue for this?
Description
The Select widget has the fields Label key and Value key, which has a JS toggle option.
In older versions like around v1.36, a user was allowed to enable the JS toggle and configure these fields based on the source data.
Scenarios like {{item.name + " " + item.code}} used to work
A user reported after updating to the latest version (currently v1.52, not sure which version it broke), this has stopped working. The expectation is to hardcode the intended key or choose it from the dropdown.
We can no longer create a combination of values from the source data.
Also the current implementation still allows you to use something like {{item.name}}, but it basically checks for the evaluated value in respective objects of source data, which is completely wrong as no architecture would require that functionality.
Either we need to stop showing it as part of autocomplete and throw error if a user tries to use {{item.<property_name>}} inside the JS toggle, as that is very confusing.
Or we should revert back to the older functionality of allowing users to use {{item.name}} which works.
IMO, it should be the latter as this also allows us to create combinations of Label or Value fields which is very convenient and we have seen other users also use it extensively in the older version.
This will remove the need for using a .map function to combine data for Label or Value field. Previously I have used workarounds like this in many Select widgets to achieve such combinations but always felt its too much code, sometimes even moving it to a JSObject.
Instead allowing to use {{item.name}} and ability to combine with other properties will simplify the Select widget configuration greatly.
Steps To Reproduce
Public Sample App
No response
Environment
Production
Severity
Medium (Frustrating UX)
Issue video log
No response
Version
Cloud
The text was updated successfully, but these errors were encountered: