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

    q-checkbox is not working with v-for, what i am doing wrong?

    Help
    3
    9
    288
    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.
    • J
      jitendra16 last edited by

      I know that I am doing something wrong because q-checkbox and q-toggle both are not working in this case. Please help.

      <tr v-for="(item, idx) in collection" :key="idx">
                            <td class="text-left">
                              <span>
                                <q-checkbox :id="idx" v-model="item.selected" />
                              </span>
                              {{ item.name }}
                            </td>
      </tr>
      
      metalsadman 1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman @jitendra16 last edited by

        @jitendra16 describe what’s not working.

        1 Reply Last reply Reply Quote 0
        • J
          jitendra16 last edited by

          check/uncheck is not working. if i try to change ‘name’ with q-input then ‘name’ is reactive and updating very well but ‘selected’ is not reactive with q-checkbox.

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

            @jitendra16 try a more unique key than an index.

            J 2 Replies Last reply Reply Quote 0
            • J
              jitendra16 @metalsadman last edited by

              @metalsadman Please check codepen, everything working good in case of ‘q-list’ but not in case of ‘q-markup-table’
              https://codepen.io/sharmaji16/pen/gOraJJZ

              1 Reply Last reply Reply Quote 0
              • J
                jitendra16 @metalsadman last edited by

                @metalsadman i don’t have any unique key, so using index.

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

                  @jitendra16 you forgot to read the warning from the docs.
                  22248c2a-df35-4b23-8022-992e003b5a05-image.png

                  https://codepen.io/metalsadman/pen/xxVZOYj?editors=1010

                  J 1 Reply Last reply Reply Quote 1
                  • dobbel
                    dobbel last edited by

                    That’s really nasty if you don’t read that. You learn something every day with Quasar.

                    1 Reply Last reply Reply Quote 0
                    • J
                      jitendra16 @metalsadman last edited by

                      @metalsadman Thanks you. sorry i missed it.

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