Closed sebastian-raubach closed 6 years ago
I managed to get the table to load (there was an issue with the data object), but now it shows [object Object],[object Object]
in each cell, which indeed is the times
object.
Is there any way to get it to display the data within that times
array in those cells?
Did you try project.times.duration for example?
I've had success accessing relationships with dot notation with similar, asynchronous data.
Thanks for the response. Unfortunately, it doesn't seem to work.
If I try show="project.times.duration"
, I get Duplicate keys detected: 'project.times.duration'. This may cause an update error.
If I try :show="project.times.duration"
, I get TypeError: Cannot read property 'duration' of undefined
I'm facing the same error in console Uncaught (in promise) TypeError: this.data is not a function
, and my object data is simple:
{
"suppliers": [
{
"id": 1,
"empresa": "Las 3 B",
"estado": "Activo",
"rfc": "US61810-1",
"facturas": 72,
"fecha_creacion": "20/06/2018"
},
...
the table:
<table-component :data="supplierData">
<table-column show="id" label="ID" data-type="numeric"></table-column>
<table-column show="empresa" label="Empresa"></table-column>
<table-column show="estado" label="Estado"></table-column>
<table-column show="rfc" label="RFC"></table-column>
<table-column show="facturas" label="Facturas" data-type="numeric"></table-column>
<table-column show="fecha_creacion" label="Fecha creación" data-type="date:DD/MM/YYYY"></table-column>
</table-component>
And axios:
axios(
{
method: options.method,
....
})
.then(response => {
if (response && response.status === 200) {
this.supplierData = response.data
......
We don't use this package anymore in our own projects and cannot justify the time needed to maintain it anymore. That's why we have chosen to abandon it. Feel free to fork our code and maintain your own copy or use one of the many alternatives.
I'm currently trying to use your excellent table component. I've got a data object that looks something like this:
I managed to get the
date
of the elements to show as a column. What I'd then want to do is show the content oftimes
as the other columns. I thought, I could get this working by doing the following:project.id
maps to theprojectId
in thetimes
object. And then extract the data fromtimes
in the formatter, but it doesn't get called and throws an error:Is there any way to use this data object without reformatting it into something that resembles your examples?