Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #104193
    jqwidgetsdev
    Participant

    Hi,

    What is the way to have children of smart-accordion-item?
    In the example below I want to have 4 child items under “First Item”.

    How can this be achieved?

        <smart-accordion id="accordion">
          <smart-accordion-item label="First Item">First Item Content.</smart-accordion-item>
          <smart-accordion-item label="Second Item">Second Item Content.</smart-accordion-item>
          <smart-accordion-item label="Third Item">Third Item Content.</smart-accordion-item>
          <smart-accordion-item label="Fourth Item">Fourth Item Content.</smart-accordion-item>
        </smart-accordion>

    Thank you.

    #104199
    Markov
    Keymaster

    Hi,

    It is not possible to have sub items in the Accordion. The Accordion is not a hierarchical component. You can add DIV tag and some content in the smart-accordion-item.

    Regards,
    Markov

    #104204
    jqwidgetsdev
    Participant

    Ok, that will work and give me the necessary control.

    #104207
    jqwidgetsdev
    Participant

    That won’t work for me. For a given smart-accordion-item I may have 2 sub items, for others 4 sub items.
    The height of the sub item must be dynamic. Can you please show me?

    • This reply was modified 1 year, 10 months ago by jqwidgetsdev.
    #104212

    Hi,

    To achieve a dynamic height of the smart-accordion-item you may set the height of its content to ‘auto’.
    The height of the smart-accordion should also be ‘auto’.

    Here is an example: https://codepen.io/svetoslavb04/pen/mdjwmwX

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

    #104216
    jqwidgetsdev
    Participant

    I appreciate the example and nuance, thanks Svetoslav!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.