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 QTable and 3 QSearch

    Help
    5
    5
    734
    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.
    • O
      Oliver_Max last edited by Oliver_Max

      Hello everyone.
      (I apologize in advance for my English).

      I have one QDataTable with 5 columns, and for first three columns i have 3 QSearch (type, name, info).

      But QTable has only one :filter=“filter”.

      How can I specify by what column should the QSearch look for?
      I need that first QSearch search in first column of QTable and etc.

      It’s looks like that:

                  <q-table
                           :data="dishes"
                           :columns="columns"
                           row-key="name"
                           :filter="filter"
                  >
                      <q-tr slot="top-row" slot-scope="props">
                          <q-td>
                              <q-search no-icon //search in type column
                                      type="text"
                                      v-model="filter"
                              />
                          </q-td>
                          <q-td>
                              <q-search no-icon //search in name column
                                      type="text"
                                      v-model="filter"
                              />
                          </q-td>
                          <q-td>
                              <q-search no-icon //search in info column
                                      type="text"
                                      v-model="filter"
                              />
                          </q-td>
                      </q-tr>
      

      Now QSearch search by name

      1 Reply Last reply Reply Quote 0
      • R
        Redleon last edited by

        Hi…im very interesting in this post, i trying to do something similar but with a q-select in the head of one of the columns…do you resolve your problem?..how?

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

          can any one share the code please I am searching for it. as <q-table has only one property

          1 Reply Last reply Reply Quote 0
          • H
            huyngo1407 last edited by

            I’m stuck with this issue too. Is anyone have solution? Please share, thank you!

            T 1 Reply Last reply Reply Quote 0
            • T
              tof06 @huyngo1407 last edited by

              @huyngo1407
              This is a pretty old thread, but you can use the filter-method property of q-table to implement your own filtering method.

              Ex : https://codepen.io/cp-tof06/pen/BajyyWp?editors=1010

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