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

    Doubts about data table

    Framework
    2
    6
    1270
    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.
    • D
      danielo515 last edited by

      Hello,

      I think the documentation of DataTable is missing some features. I searched across the forum, and looks like people know how to do this things, but nobody says how:

      • How can I set a column as sticky ?
      • How can I add a column with controls for every row ? I don’t want to add an extra property to my objects just to be able to customize this row
      • How can I customize columns programmatically ? The q-td component forces you to define the column name beforehand. I want to define which cells should be customized based on the type: date ? object ? array ?

      Thanks in advance

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

        1. I am unsure if this is still possible
        2. you must add a property for every row, or render rows manually, see docs
        3. you can do that if you render the row manually using the body slot, see docs
        1 Reply Last reply Reply Quote 0
        • D
          danielo515 last edited by

          Hello @benoitranque
          Thank for your answers. Regarding poing one, I saw several issues about sticky columns, so it should be possible. Here is a guide about making them look prettier:
          http://forum.quasar-framework.org/topic/889/qdatatable-sticky-column-style-enhancement/2

          Regarding controls I was fearing an answer like that. To be honest, adding a property to my data just to be able to render a control column does not look like something clean to me. Just adding the column is not enough, you must add the actual field to the results.
          I thought about using the selection slot, but I am unable to target such slot. Do you know where can I check which slots are available ? I tried body-cell-selecction col-selection and some other combinations. Some documentation about that would be valuable.

          Regarding the third, I came to that conclusion too. But you don’t have to render the full body, you can use body-cell slot and save yourself some iteration logic.

          Thanks and regards

          D benoitranque 2 Replies Last reply Reply Quote 0
          • D
            danielo515 @danielo515 last edited by

            @danielo515 said in Doubts about data table:

            Regarding controls I was fearing an answer like that. To be honest, adding a property to my data just to be able to render a control column does not look like something clean to me. Just adding the column is not enough, you must add the actual field to the results.

            That is just not true. You can just add a column to the list of columns and it will be rendered, even that prop does not exist on your data. My mistake here was that I was not including it on the list of visible columns

            1 Reply Last reply Reply Quote 1
            • D
              danielo515 last edited by

              I summarized my findings here:
              http://forum.quasar-framework.org/topic/1877/datatable-small-tips

              1 Reply Last reply Reply Quote 1
              • benoitranque
                benoitranque @danielo515 last edited by

                @danielo515 said in Doubts about data table:

                Hello @benoitranque
                Thank for your answers. Regarding poing one, I saw several issues about sticky columns, so it should be possible. Here is a guide about making them look prettier:
                http://forum.quasar-framework.org/topic/889/qdatatable-sticky-column-style-enhancement/2

                Regarding controls I was fearing an answer like that. To be honest, adding a property to my data just to be able to render a control column does not look like something clean to me. Just adding the column is not enough, you must add the actual field to the results.
                I thought about using the selection slot, but I am unable to target such slot. Do you know where can I check which slots are available ? I tried body-cell-selecction col-selection and some other combinations. Some documentation about that would be valuable.

                Regarding the third, I came to that conclusion too. But you don’t have to render the full body, you can use body-cell slot and save yourself some iteration logic.

                Thanks and regards

                There no longer is a “selection” slot. Use the selected.sync prop instead

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