I am currently building a module in which I have the following:
List view within a list view that holds form fields
Both List views have Instance Values enabled
Transformers that contain validation logic for the form fields and use the instance values of the outer list view
The validation logic works as expected when testing the module itself. However, as soon as I embed the module in an app, the form data keys switch to use the module name as a prefix:
[{
textInput1: "..."
}]
thus becomes
[{
moduleName::textInput1: "..."
}]
This happens both when I use {{ self.id }} as the form data key as well as when I override it to any other value.
For now, I have built a custom window function that removes everything before the "::" and this way normalises the object key names. However, I also need to add this window function to both the module and each app in which the module is used, which is not ideal.
It would be great if this could be resolved – thank you!
Also, have you considered using a Stepped Container component?
It might be easier to use for accomplishing the use case, as double nesting list view components and threading down variable values from these to inner nested components is definitely one of the more tricky things to do.
Which is exactly why we built out the stepped container
I unfortunately did not further try to solve this issue as I already built a workaround using a custom window function as explained above.
In general, I am using nested list views because I am displaying data dynamically on two levels and using a module because I want the functionality to be reusable across apps. Sure, I could put the functionality directly into the parent app, but then it wouldn't be reusable anymore.
I am not quite sure how tabbed containers would help solve this issue.
Ok I see, apologies for the confusion with the modules, we are working on a major overhaul because their function as re-usable component blocks is so critical for developers and they have become outdated.
I was thinking tabbed containers would be for the top level to toggle between various options and inside each at the lower level you could use other components. Just a thoughts.