Are Container components usable in the Lightning App Builder where I can put child components on it via point-and-click possible at all?
I’m looking for something like the standard Tabs component. Can we create a container component like that?
If this is currently not supported:
- is this on the roadmap?
- what is the correct name of that feature? (it might be called or related to the terms ‘placeholders’ or ‘regions’ but this is unsure, and more feedback is required)
- for which release this feature is targeted?
- is there a pilot program?
If this is currently supported:
Is there any example with source code or detailed documentation on how to create a Lightning Component, which acts as a container for sub components in the Lightning App Builder?
Why do I need this?
I need to create collapsible sections which can also be made invisible by conditions. The content needs to be designable in the App Builder. (Edit: this was only my first need. In the meantime I figured dozens of meaningful missing usecases like better Tabs, better and more flexible Layouts and nested sub-Layouts all kinds of Panels and so on. Don’t want to wait on Salesforce providing all that for me)
If possible (which seems unlikely, but I haven’t given up yet) I just need a simple example, the rest I can do on my own.
you’re right that this isn’t supported yet, and there’s no public scheduled roadmap for this (2016-12-29). That said, the use case is clear and obviously useful to a lot of people.
If you’ve seen John Belo’s Advanced Lightning Apps webinar he suggests a pattern that might help you though.
Here’s what I would do. I acknowledge that this is not the same as the nice interface you’re looking for. Create a custom metadata type for your ComponentConfigGroup. Then, another custom metadata type for ComponentConfigItems with a metadata relationship to the group.
I’d define one “group” per page you want to use your component on, and it’d have
n “items”, which each define their content and the conditions. Then, in Lightning App Builder, you drag over one global component and type in the DevName of your group metadata record.
On the roadmap (I’ve heard pilot in summer, safe harbor) is some level of dynamic function added to the design/attributes pane in app builder, which might let you display all your groups for the user to select.