Skip to content

Dropdown Menu component with for-loop in SSR #179

Answered by Ethosa
jerrygzy asked this question in Q&A
Discussion options

You must be logged in to vote

Reason in class attribute:

                tButton(if i == 0 : class="active"):

Right way is:

                tButton(class = if i == 0: "active" else: ""):

Or this way:

        tButton(
            class =
              if i == 0:
                "active"
              else:
                ""
        ):

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jerrygzy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants