oui
oui copied to clipboard
[BUG] Unable to easily copy/paste data from a Data Table visualisation
When viewing a Data Table visualisation it used to be possible (Opensearch 2.6.0??) to copy and paste the table data straight from the visualisation by selecting the cells you are interested in and pressing ctrl+c to paste elsewhere. This was extremely useful when throwing together a quick visualisation and copy/pasting numbers from it elsewhere like a chat or email.
In some of the more recent versions, when you copy and paste it you get something Like this
OriginCityName: Descending
Count
Rome
Row: 1, Column: 1:
119
Row: 1, Column: 2:
London
Row: 2, Column: 1:
95
Row: 2, Column: 2:
Quito
Row: 3, Column: 1:
84
Row: 3, Column: 2:
Seoul
Row: 4, Column: 1:
83
Row: 4, Column: 2:
Osaka
Row: 5, Column: 1:
80
To Reproduce
- Create a Data Table visualisation, or go to this playground link
- Select some or all of the data in the table and copy the data (right click -> copy, or ctrl+c)
- Paste the data elsewhere, e.g. excel, an email, notepad etc.
- Note that the data is not as copied, and in a
Row: y, Column: xformat as above
Workaround It is possible to still get the data out by saving the exporting the data to CSV, loading into Excel or similar then copying from there to paste elsewhere but that is time-consuming in comparison.
Expected behavior When I paste elsewhere I expect to see the data in a tabular format. If I paste into Excel it should appear in different cells in rows and columns exactly as in the table. If I paste into an email, document, or chat it should preserve the table and paste as a table
OpenSearch Version 2.9.0
Dashboards Version 2.9.0
Host/Environment
- Windows
- Firefox 102.13.0esr (64-bit) or Google Chrome 114.0.5735.199 (Official Build) (64-bit)
@jgough Thanks (as always!) for filing this. I agree that it's an overlooked, but common use case. The table rendering component was swapped out for one with more flexibility (such as resizable columns), but there was no intent to change the copy behavior.
@BSFishy @curq @KrooshalUX This is an interesting "enhancement" idea for the OUI component, because I don't believe it was designed with basic copy/paste usage in mind.
@joshuarrrr new data table vis is based on OuiDataGrid correct?
Additionally, the old table visualisation used to contain data in <td> elements, which made selecting in Firefox easy by pressing ctrl and then clicking and dragging to select the cells of the table you are interested in.
This cell selection feature is sadly not present in Chrome.
@joshuarrrr new data table vis is based on OuiDataGrid correct?
Yep