Hello,
I am building a component that creates the function of an accordion. The accordion itself works. It consists of two galleries and is structured as follows:
gal_Accordion
ico_Accordion_OpenClose
lbl_Accordion_Category
gal_Accordion_Content
ico_Accordion_Content_Next
shp_Accordion_Content_Next
lbl_Accordion_Content_Header
lbl_Accordion_Content_MainThe data source for the Accordion is a table, e.g.:
Table(
{
Id: 1
Text: "Chapter 1"
},
{
Id: 2
Text: "Chapter 2"
},
{
Id: 3
Text: "Chapter 3"
}
)With this I create 3 sections in the outer gallery, Chapter 1, 2 and 3. The content of the inner gallery is now filtered and displayed based on the selected chapter. The individual sections expand and collapse when clicked. This all works on a normal screen.
The challenge now is to convert the whole thing into a component that can be fed with any table as a source.
The content of "lbl_Accordion_Content_Header" consists of "ThisItem.Header", for example.
But if I don't know how my source is structured (does it even have a "Header" column), then I can't make this assignment in the component either.
Question: How can I design the component so that it is possible to define (e.g. via the custom properties of the component) what is displayed from the source, e.g. in "lbl_Accordion_Content_Header" or "lbl_Accordion_Content_Main"?
Does anyone have a tip for me? Many thanks for the support.

Report
All responses (
Answers (