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

    Multiline autocomplete (q-select with textarea input?)

    Framework
    3
    9
    829
    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.
    • C
      chyde90 last edited by chyde90

      By using <q-select> with the use-input option we can make a really nice auto-complete field.
      I would like to have multi-line support for this (single-selection). Can we use it with a textarea somehow?

      Is it possible that this could be implemented in QSelect?`I have a fear that this use case is too uncommon 😟


      EDIT: Sorry, I think I was not clear. So let me re-state the issue:
      I made something like this using Quasar v0.17: https://jsfiddle.net/og4dy9zu/3/ : a textarea(!) with pre-defined options. (It’s actually used for auto-completion, but to simplify the example I’m using a static list of options).
      I am not able to do it with the current version of Quasar, because the q-autocomplete is gone.

      Now, is it possible to put a textarea input inside a q-select? Or, if not - is there a possibility that this can be supported again?

      1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman last edited by metalsadman

        Qselect multiple wraps the values to next line as they are added, so i dont get why you need it to work like a text area.

        1 Reply Last reply Reply Quote 0
        • C
          chyde90 last edited by

          @metalsadman I have a record that stores a text with multiple lines. And in the form there should be suggestions/autocomplete results

          1 Reply Last reply Reply Quote 0
          • C
            chyde90 last edited by

            With Quasar v0.17, it could easily be done with <q-autocomplete> inside a textarea.
            See here: https://jsfiddle.net/og4dy9zu/3/ This is what I’m looking for.

            It is the last thing that holds me back from rolling out a new version of my project including the Quasar v1 upgrade 😢

            1 Reply Last reply Reply Quote 0
            • metalsadman
              metalsadman last edited by metalsadman

              @chyde90 it won’t parse the \n for you in the options, so what you could do is make those into html equivalent ie. <br>, since it does accept html. https://codepen.io/metalsadman/pen/yLLjyOy?editors=1011

              C 1 Reply Last reply Reply Quote 0
              • C
                chyde90 @metalsadman last edited by chyde90

                @metalsadman hmm… it seems I didn’t make the problem clear enough😅 I edited my original post to make it more clear.
                The jsfiddle shows the desired behavior, which I can’t re-produce in the current version of Quasar.

                I’m not talking about multi select mode. And I don’t mind that the options in my jsfiddle link are not displayed with multiple lines.
                The key point is that the user writes a multi-line text. That means when he hits the enter-key, there is a new line (in the same string) - just like <q-input type="textarea" />. But this as the input in a q-select, so that the user can also choose from options as an alternative to typing everything in.

                1 Reply Last reply Reply Quote 0
                • metalsadman
                  metalsadman last edited by metalsadman

                  @chyde90 you could try issue a feature request for this, maybe a prop (multiline or smth) that would be passed to the inner input element to make its type a textarea when using use-input prop. kind of odd behavior tho, not sure if that was intended back in v0.17. One could do it using qinput + qmenu in v1, but i dont know if it’s worth the hassle.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mysocialpbn last edited by

                    How can I do it؟

                    1 Reply Last reply Reply Quote 0
                    • metalsadman
                      metalsadman last edited by metalsadman

                      @mysocialpbn Op haven’t filed a feature request, so you can build similar functionality on your own, using qinput and qmenu (if this is a priority for you).

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