cypress-ag-grid
cypress-ag-grid copied to clipboard
Duplicate column names causes only last columns' data to be returned
If I have a grid with say the columns [Requested, Settled, Requested, Settled]
Only the data from the last two columns is returned.
So for | Requested | Settled | Requested | Settled | | 10 | 5 | 6 | 8 |
A call to getAgGridData()
would return [{"Requested": 6, "Settled": 8}]
In most scenarios where this occurs I imagine the user will have some group headers to differentiate between the columns themselves - so I propose adding the group header names to the column names to get around this.
So for | Total Price | Total Volume | | Requested | Settled | Requested | Settled | | 10 | 5 | 6 | 8 |
We'd get [{"Total Price Requested": 10, "Total Price Settled": 5, "Total Volume Requested": 6, "Total Volume Settled": 8}]
I currently have a working fix for this locally - happy to put up a PR to add it if wanted?
Hey @OVO-Josh ! So sorry for the delayed response. I will carve out time this week to take a look and will respond shortly.
If you have a working fix, please feel free to put up a PR if you’d like!