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
    1. Home
    2. Crazralfrill
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Best 0
    • Groups 0

    Crazralfrill

    @Crazralfrill

    0
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Crazralfrill Follow

    Latest posts made by Crazralfrill

    • RE: QSelect to fetch data from server

      Ok I get it from your example. options should be in data (which makes sense…).
      Thanks !

      posted in Help
      C
      Crazralfrill
    • RE: QSelect to fetch data from server

      @metalsadman What do you mean ?
      I’m calling this.options = [{"value": test2, "label": "test2"}]; in fetchSources (post #1) but it does nothing.
      It should display the “test2” option but it displays nothing.

      posted in Help
      C
      Crazralfrill
    • RE: QSelect to fetch data from server

      @metalsadman That’s what I did, but in the example, the options prop is set as

      stringOptions = [
        'Google', 'Facebook', 'Twitter', 'Apple', 'Oracle'
      ]
      

      My code :

      <q-select
                        v-model="sources"
                        multiple
                        use-input
                        @filter="fetchSources"
                        :options="[]"
                        style="width:300px"
                        label="Filtrer par source"
                      />
      

      And I call update to set this.options but it’s not working unless the options props of QSelect already contains the value returned in fetchSources.
      Which is useless of course, because I want the options to be dynamic and dependant of the server returned values.

      posted in Help
      C
      Crazralfrill
    • QSelect to fetch data from server

      Hello,

      I’m trying to use QSelect to show and filter data from a server.

      So I want my q-select to be empty at first, and when the user starts to type 1 or 2 characters, it sends a request to the server to get the select values.

      I don’t understand how to do it.
      I tried to populate the select with the @filter event :

      fetchSources (val, update) {
           update(
               () => {
                  // get data from server
                  this.options = [{value:"test2",  label:"test2"}]
               })
         },
      

      But it does nothing because it needs the “test2” options already exists in the :options prop of q-select.

      So what’s the proper way to implement this ?

      Thanks.

      posted in Help
      C
      Crazralfrill