frappe / datatable

The Missing Javascript Datatable for the Web
https://frappe.io/datatable
MIT License
1.02k stars 164 forks source link

[Feature request] Nested headers #48

Open jledentu opened 5 years ago

jledentu commented 5 years ago

Hi,

Thank you for your amazing project, this library looks very promising.

It would be so nice if we could create nested headers, i.e. several levels of headers with headers on top of children headers. See this example in Handsontable.

We could define these nested columns like this, for instance:

columns: [
    {
        name: 'Framework infos',
        nestedColumns: [
            { name: 'Framework name' },
            { name: 'GitHub Stars' },
            { name: 'Forks' }
        ]
    },
    {
        name: 'Actions',
        nestedColumns: [
            { name: 'Project Link', format: value => `<a class="text-primary" href="${value}">${value}</a>` },
            { name: 'Fork', format: value => `<a class="text-primary" href="${value}">${value}</a>` }
        ]
    }
]

Are contributions welcome? I may submit a PR if you think this is an interesting feature.

anklav24 commented 2 years ago

That's what I'm looking for!