q-table: column setting field to object.property
-
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.19Any help/suggestions appreciated.
Regards.
Jonathan -
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
-
try this
field: 'name', // OR field: row => row.some.nested.prop,
https://quasar.dev/vue-components/table#Defining-the-columns