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-table: column setting field to object.property

    Help
    3
    3
    1761
    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
      Dabnis last edited by

      q-table: column setting field to object.property syntax?
      I have tried :
      {
      name: ‘name’,
      required: true,
      label: ‘Name’,
      align: ‘left’,
      field: ‘delDetails.name’, // Note object.property data assignment.
      sortable: true,
      },
      but I never get the data value as held in the data array.

      Primary data objects work OK :
      {
      name: ‘timeReceived’,
      required: true,
      label: ‘Received’,
      align: ‘left’,
      field: ‘dateTime’, // Note single object data assignment
      sortable: true,
      },

      Quasar CLI: v0.17.23
      Quasar Framework: v0.17.19

      Any help/suggestions appreciated.

      Regards.
      Jonathan

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by s.molinari

        Look closely at the comments in the example code section here: https://quasar-framework.org/components/datatable.html#Defining-the-Columns

        The bit about nested properties.

        Scott

        1 Reply Last reply Reply Quote 0
        • M
          murilo.nxz last edited by

          try this

          field: 'name',
          // OR field: row => row.some.nested.prop,
          

          https://quasar.dev/vue-components/table#Defining-the-columns

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