[CDataTable] Allow nested objects / fields
See original GitHub issueI would like to request support for nested objects / fields.
item: {
id: 1,
code: 'xx',
unit: {
description: 'myDescription'
}
}
fields = [
'id',
'code',
'unit.description'
]
<c-data-table :items="items" :fields="fields" />
This would result in a table with a description
column with the value derived from the unit
object.
Currently if I do this the field value is undefined
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
DataTable - CoreUI
When set, displays table filter above table, allowing filtering by specific column. addTableClasses, (string | any[] | object). Adds classes to table element....
Read more >javascript - Display collection of nested objects in DataTables
I want to display the above JSON in "DataTables". The nested objects in the IssueList should be displayed as a child table inside...
Read more >Nested object data (objects) - DataTables example
The example below shows DataTables reading information for the columns from nested objects and arrays, where the structure of the row's data source...
Read more >Solved: Create JMP datatable from C# DataTable variable
I could try nested for loops to loop through columns and rows and have JSL ... Columns.Add(column); // Create new DataRow objects and...
Read more >Package 'data.table' - R Project
table;. i.e., it sees column names as if they are variables. This allows to not just select columns in j, but also compute...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi! Scoped slots are made for unusual cases like this. Solution:
Yes, this is a valid use case, I get your point. 😉
Btw. You can keep your nested data, and just add an additional key to the item, just don’t mention nested data key in ‘fields’ prop. This way you preserve your desired structure and simplify CDataTable usage. Then computing could look like this