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

    Performance of q-input with type=textarea in a transition-group

    Framework
    3
    5
    925
    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.
    • W
      wux last edited by

      I have a list of about 30 items in a transition-group, each list item includes a <q-input type=“textarea”…>, the render of the page has been very slow on Chrome and extremely slow on Safari(both on Mac, it’s much faster on Firefox 57/Quantun). When changing to native textarea control, it all works fine. It also works fine when removed the transition-group and still use textarea type q-input. I understand the transition-group has some potential performance issues with complex css in a list (https://github.com/vuejs/vue/issues/5845), just wondering if @rstoenescu or anyone else has any advice here? I could change to use native textarea input but the style does not quite match the rest of controls on the page, and I really like the auto-grow feature of the q-input. Thanks.

      1 Reply Last reply Reply Quote 0
      • R
        Rodolfo Recordon last edited by

        I have the same problem. Did you get a solution for that?

        dobbel 1 Reply Last reply Reply Quote 0
        • dobbel
          dobbel @Rodolfo Recordon last edited by

          @rodolfo-recordon

          You could try to Object.freeze() your data:

          https://vuejs.org/v2/guide/instance.html

          1 Reply Last reply Reply Quote 1
          • R
            Rodolfo Recordon last edited by

            Thank you, @dobbel! I really appreciate the suggestion. It was a really good one. However, I will have to try something else… It masters the performance, but kills the interactivity. Once I focus out the input, the initial value of it gets back. Even though the ability to save the changes is intact and the user gets the new info on refresh, it’ll be a problem in terms of user experience.

            Any other suggestions?

            dobbel 1 Reply Last reply Reply Quote 0
            • dobbel
              dobbel @Rodolfo Recordon last edited by

              @rodolfo-recordon

              You could try something like this with v-bind:value :
              https://jsfiddle.net/gs0kphvc/

              Because you are using 1-way data binding now. You’ll have to manually ‘save’ the new input data’ yourself.

              You could have a submit like save button to collect all the new data( like how vanilla html forms work) . Or you could use @blur(lose focus) to save the data.

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