nick-keller / react-datasheet-grid

An Airtable-like / Excel-like component to create beautiful spreadsheets.
MIT License
1.81k stars 170 forks source link

Support duplicate columns #313

Open mendeljacks opened 1 year ago

mendeljacks commented 1 year ago

it would be great to have support for array of array so that we can have two columns in a sheet with the same name let table = [ ['Name', 'Age', 'Name'], // <-- Notice we have "Name" twice (duplicate columns) ['Alice', 25, 'DuplicateColumnData'], ['Bob', 30, 'AnotherDuplicateColumnData'] ];

Whereas this will not work let table = [ { Name: 'Alice', Age: 25, Name: 'DuplicateColumnData' }, // <-- This is not valid JavaScript! { Name: 'Bob', Age: 30, Name: 'AnotherDuplicateColumnData' } // <-- This too is not valid JavaScript! ];

The use case for this is that a sheet has two heading rows and the column names are only unique within one group