Open olemartinorg opened 3 months ago
I'm not sure I understand this issue. Is it about the config setting AppSettings.RemoveHiddenData
or the static method LayoutEvaluator.RemoveHiddenData
that they can use in hooks in apps?
If it is the configuration setting for process/next
, I don't really see a good place for configuring this behaviour, so I'm a little stuck. The obvious place would be to have a "hiddenDontRemove" : true
on the component in the layout, but not sure how frontend will react to that?
Sure, it could be set on the component as well. We would have to introduce a parameter for it in the frontend (which we'd probably never read) so that it's included in the layout JsonSchema, but that could work.
How about visuallyHidden
, as a frontend only feature?
var hideComponent= evaluate("hidden") || evaluate("visuallyHidden")
+1
Description
SSB frequently uses hidden components in a way we did not first consider when developing the
RemoveHiddenData
functionality. They prefill the data model with values and use always-hiddenDropdown
components to show the label for an option in aRepeatingGroup
table. This is possible because historically app-frontend have displayed values in the repeating group table even if the components inside are actually hidden (whoops).This also means that the 'hidden' data is deleted when using
RemoveHiddenData
. We'll fix this in https://github.com/Altinn/app-frontend-react/issues/1709 by not actually "removing" hidden data, but actually only roll back user changes (and this not being a user change would mean we don't actually remove anything even though the component is hidden).In the meantime, SSB wishes for functionality to ignore certain paths from being removed by
RemoveHiddenData
. This, of course, also includes paths in repeating groups (aka properties of objects in arrays).Additional Information