Merge branch 'feature/table-component' into 'release'
Table will construct columns based on all data See merge request theappsmith/internal-tools-client!102
This commit is contained in:
commit
765f6f3d07
|
|
@ -15,7 +15,11 @@ interface Column {
|
|||
|
||||
function constructColumns(data: object[]): Column[] {
|
||||
let cols: Column[] = [];
|
||||
forIn(data[0], (value, key) => {
|
||||
let listItemWithAllProperties = {}
|
||||
data.forEach(dataItem => {
|
||||
Object.assign(listItemWithAllProperties, dataItem)
|
||||
})
|
||||
forIn(listItemWithAllProperties, (value, key) => {
|
||||
cols.push({
|
||||
key: key,
|
||||
dataKey: key,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user