-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
1.8.2
Description of problem:
Today fetch:response:default only supports a static string. Customers need to set the default selection based on the fetch response itself (e.g., a field in the response that marks the selected item).Enhance fetch:response:default to accept a selector/expression (jsonata) against the fetch response. If the selector resolves to a valid option, set it as the initial value when:
- fetch:skipInitialValue is not true
- the user has not changed the field yet
If fetch:response:default is still a static string, keep existing behavior.Acceptance criteria:
- fetch:response:default supports either:
- static string value, or
- selector string evaluated against fetch response
- If selector result matches a fetched option, it becomes the default selection
- Respects fetch:skipInitialValue and isChangedByUser
- Add tests for selector default and fallback behavior
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
# <steps>
Actual results:
fetch:response:default only accepts a static string; it cannot be derived from the fetch response, so default selection must be hardcoded.
Expected results:
fetch:response:default can be a selector/expression evaluated against the fetch response (as well as a static string), allowing the default option to be chosen dynamically from the response.