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

    Table Grid mode

    Help
    3
    9
    442
    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.
    • A
      ak101 last edited by ak101

      In table Grid mode, How I can change the status 0/1 to word??
      When I call api status value is 0/1, but I want it display in word. Tq
      15f7fc68-0b04-489a-a3bc-9559df27e47f-image.png

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

        @ak101

        what do you mean with:

        status 0/1 to word

        You will be better helped if you put your code in the comment or in a codepen.io.

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

          @ak101 Do you wish to also display it as a word in row mode? Or if you don’t use row mode at all, the same answer applies:

            {
              name: 'status',
              label: 'Status',
              field: 'status',
          
              format: val => val ? 'Enabled' : 'Disabled',
            },
          

          If you use both grid and row mode, and don’t want it displayed as a word in row mode, you’d need to use item scoped slot.

          1 Reply Last reply Reply Quote 0
          • A
            ak101 last edited by

            @beets for my table list it is already display Inactive and Active. When I go to grid mode, It is display 0 /1 because the value call from api is 0 / 1, I don know how to change the value in grid, for table can.

            1 Reply Last reply Reply Quote 0
            • A
              ak101 last edited by

              e678d35d-8786-4294-8477-056bc87129af-image.png
              83260d90-803c-48cb-9e24-ec56021c8147-image.png
              @beets

              1 Reply Last reply Reply Quote 0
              • A
                ak101 last edited by

                @dobbel https://codepen.io/Adriantango/pen/MWymeEQ?editors=1010
                this is before call the api, I m beginner, I not very sure how to write it in code pen

                1 Reply Last reply Reply Quote 0
                • A
                  ak101 last edited by

                  @dobbel @beets anywhere, I fix it
                  Thank you very for reply me

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

                    @ak101 would you be so kind to post how you solved it? It will help future visitors who find this thread. Reference

                    1 Reply Last reply Reply Quote 1
                    • A
                      ak101 last edited by ak101

                      I used this code to display the action/Inactive when I call from API value is 0/1

                      field: row => row.status == ‘0’ ? ‘Inactive’ : ‘Active’,

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