plotly / dash-table

OBSOLETE: now part of https://github.com/plotly/dash
https://dash.plotly.com
MIT License
420 stars 72 forks source link

Column is automatically merged when merge_duplicate_headers = true if the names are the same and the data is different #490

Open alinastarkov opened 5 years ago

alinastarkov commented 5 years ago

bug1

and the data in demo/data.ts is:

...
 {
        id: 'ccc',
        name: ['City', 'Canada', 'Toronto'],
        type: ColumnType.Numeric,
        data: gendata(i => i, rows)
    },

    {
        id: 'ddd',
        name: ['City', 'Canada', 'Toronto'],
        type: ColumnType.Numeric,
        data: gendata(i => i * 100, rows)
    },
...
alexcjohnson commented 5 years ago

Nice find @alinastarkov!

Is there a use case for two columns with entirely merged headers? To simplify that, is there a use case for merging single-row headers? I guess I can imagine cases I might want to do it - say I have 2 columns for each year, and it's clear from the values in each column what they mean, like the first column is sales volume and the second is percent change from the previous year. It would preclude single-column operations like sorting, but that doesn't seem like a good reason to forbid it. This bug might be though, if we can't figure out a workaround.