You need to sign in to do that
Don't have an account?
Christian Schwabe (x)
LWC: Pagelayout collapsible section
Hi everybody,
based on this article (https://metillium.com/2018/04/collapsible-section-page-layout-record-display-lightning-components/) I've tried to adapt and implement a custom page layout with collapsible sections with lightning web component.
Currently everything works fine, BUT I didn't get it to work to open and close the section with transition so that is looks really smart.
Currently the ui looks like the following:
In comparison with the standard pagelayout there are very small differences for the layout.
The arrow looks like a fat arrow:
Could you give me a hint how to implement a transition to that the ui looks really smoothly and how to make my custom component look like teh standard layout section?
Is there also the possibility to change the text color?
Unfortunately I have only rudimentary knowledge about CSS.
Best regards,
Christian
based on this article (https://metillium.com/2018/04/collapsible-section-page-layout-record-display-lightning-components/) I've tried to adapt and implement a custom page layout with collapsible sections with lightning web component.
Currently everything works fine, BUT I didn't get it to work to open and close the section with transition so that is looks really smart.
Currently the ui looks like the following:
In comparison with the standard pagelayout there are very small differences for the layout.
The arrow looks like a fat arrow:
Could you give me a hint how to implement a transition to that the ui looks really smoothly and how to make my custom component look like teh standard layout section?
Is there also the possibility to change the text color?
Unfortunately I have only rudimentary knowledge about CSS.
Best regards,
Christian
You can expand multiple sections too. here is an example : https://rajvakati.com/2018/09/26/multiple-sections-with-lightningaccordion/
Regards,
Krishna Avva
All Answers
Please take a look at this documentation. Accordion tag will help you achieve what you are asking for.
Example code and reference are here : https://developer.salesforce.com/docs/component-library/bundle/lightning-accordion/example
Regards,
Krishna Avva
thanks for your response.
Your absolutely right, but unfortunately it doesn't fit my requierment because an accordion only allow one open section at once. I want to implement a component build by my Pen which has the same fubctionality as the standard detail page.
Regards,
Christian
You can expand multiple sections too. here is an example : https://rajvakati.com/2018/09/26/multiple-sections-with-lightningaccordion/
Regards,
Krishna Avva
really nice. That is exactly what I am looking for. Your example behind the link shows an aura component, but I've verified that this is also working with lwc accordion: https://developer.salesforce.com/docs/component-library/bundle/lightning-accordion/documentation
I didn't even know that an accordion works with multiple sections and I asked myself more than one time why this doesn't work. Now I'm smarter.
Thanks a lot for support and time. ✌🏻️
Best regards,
Chris
with your hint I am able to proceed with my plan to build a custom pagelayout with collapsible sections on lwc.
The problem is, that lightning-record-view-form looks like it doesn't allow child componens in it.
My approach looks like the following:
The c-collapsible-sections looks like the following:
The ui looks like the following (collapsed):
The ui looks like the following (expanded):
As you can see no lightning-output-field is displayed.
Do you know any reason for this behaviour?
Also: The lightning-tabset looks different than the standard.
The standard-tabset looks like the following:
In my opionion it much more bigger than lightning-tabset and lightning-tab.
Do you know why?
Kind regards,
Christian