PricingBlog

Show/hide dropdown on a repeated list

  • kamilnader-1186245257214574653

    Kamil

    2 years ago

    Hello, I am trying to add a dropdown on a repeated list that only shows when clicked on the button, which is on the list.

    Currently, I am using a variable that is set to true when clicked, and the dropdown is shown. However, currently, all the dropdowns on the list items are showing. Any ideas on how to modify the show/hide formula?
  • andreasmoller-1186248172054519858

    Andreas Møller

    2 years ago

    There is two ways we frequently use.

    1. Instead of setting the variable to False or True, Set it to Null or the index of the selected item.
    Then set the dropdown dialog to only show if the repeat item index is equal to the index in the variable
  • 2. create a component that renders the list item, and move the dropdown logic inside the component.
  • Was that helpful?
  • kamilnader-1186250400937029632

    Kamil

    2 years ago

    Thank you, @Andreas Møller The first solution did the trick 👍
  • Tod-1186250401859764287

    Tod

    2 years ago

    Great energy @Kamil! Your continuous contribution to the toddle Community just made you advance to Community Level 1!
  • andreasmoller-1186250462089990275

    Andreas Møller

    2 years ago

    🙂