Conversation
olemartinorg
left a comment
There was a problem hiding this comment.
Great work! 👏 Maybe we should add a unit-test to make sure every (new) component implementing getDisplayValue() has a corresponding shared test for this expression function? 🤔 That way we would ensure the backend gets a push to implement new components for this functionality as well.
Great idea! |
|
SonarCloud Quality Gate failed.
|











Description
Adds a new expression function:
["displayValue", "<componentId>"], which returns the formatted string representation of the component's form data which can be used to build texts. To make this work I had to convert all of the hooks used intoget-functions with the required state as arguments. The hooks are preserved but use theget-functions under the hood to avoid duplicate implementations (similar touseLanguage)Shared tests:
Related Issue(s)
Verification/QA
src/layout/layout.d.tsandlayout.schema.v1.json, and these are all backwards-compatiblekind/*label to this PR for proper release notes grouping