No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Transition in QList

    Framework
    4
    7
    1153
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      elias p last edited by

      Hi,

      I am struggling to find a way to apply an animation effect to a QList when the model changes. I tried unsuccessfully to enclose <q-item>s in a <transition-group tag=“div” name=“list”> (adding the relevant css classes).
      BTW I would expect a native Quasar functionality for transitions of rows for both lists and tables.

      Am I missing something?

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        There is no model for QList, so you can’t expect that Quasar does something special on model changes. It has no clue about them. The model change and reacting to them is up to userland since userland has to build the list.

        Here is my attempt. It might get you going.

        https://codepen.io/smolinari/pen/zYYrozo?editors=1010

        Scott

        1 Reply Last reply Reply Quote 0
        • E
          elias p last edited by

          Scott, thank you for your reply!

          However, your example treats each item individually, and my purpose was to use the transition to notify the user about the extend of all changes (additions, removals and movements) triggered by applying a filter or sort order. Using animations based on <transition> tag instead of <transition-group> confuses the user rather than notifies them and the animation is aesthetically weird. In my case I have already solved the problem by replacing the <q-list> component by a simpler custom component.

          Anyway, I don’t think that QList needs to be aware of the model in order to provide vue’s <transition-group> functionality as an option.

          Thanks again,
          Elias

          1 Reply Last reply Reply Quote -1
          • s.molinari
            s.molinari last edited by

            I think I understand what you mean now. Maybe ask in GH as a suggestion to see if it is possible. I’m not experienced enough to say yay or nay on that.

            Scott

            1 Reply Last reply Reply Quote 0
            • E
              elias p last edited by

              I’ll do ask for the functionality in GH. Thanks!

              1 Reply Last reply Reply Quote 0
              • S
                skypart last edited by

                https://codepen.io/thingnoystudio/pen/jOWXOeK?editors=0010

                1 Reply Last reply Reply Quote 1
                • L
                  Liwoj last edited by

                  @skypart Yep, that “seems” to work but problem is items are wrapped in additional element which breaks some features depending on CSS (for example “separator” prop on “q-list”)

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post