hoist-react
hoist-react copied to clipboard
"Copy" context menu item behavior for Total rows inconsistent with other rows
Reported by client QA team. The copy menu item for regular rows puts the whole in your clipboard. While for total rows it only grabs the cell you are right clicking on.
Almost certainly an ag-grid bug - if it comes up again in QA we can confirm look for a record of it on their side. @saba-mo did check and this is not a new v27 bug.
I know they have been working on the clipboard in latest release -- would be interesting to see if this has been fixed.
It looks like this is a limitation of pinned rows, and doesn't appear to be fixed in the current release. Worth attempting to come up with our own workaround? Or filing a ticket with ag-grid directly?
we should file this with ag-grid, I think
On Fri, Jun 10, 2022 at 4:19 PM Greg Solomon @.***> wrote:
It looks like this is a limitation of pinned rows, and doesn't appear to be fixed in the current release. Worth attempting to come up with our own workaround? Or filing a ticket with ag-grid directly?
— Reply to this email directly, view it on GitHub https://github.com/xh/hoist-react/issues/2967#issuecomment-1152707796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARTL2NN6TA3L7DWHUI2DMLVOOPOBANCNFSM5T7VZMYA . You are receiving this because you commented.Message ID: @.***>
Sounds good- after looking at this a little more, it does seem to be a documented limitation:
Clipboard "When Row Selection is enabled by setting gridOptions.rowSelection to either "single" or "multiple", then copying while a row is selected will add the whole row's contents to your clipboard."
Row Pinning "Pinned rows are not part of the main row model. For this reason, the following is not possible: Row Selection: Pinned rows cannot be selected."
Will message you separately about filing with ag-grid
AG-Grid feature request: https://www.ag-grid.com/pipeline/?searchQuery=AG-2339
Potential intermediate approaches:
- Use range selection to copy the pinned row which is currently supported
- Take control of the clipboard and implement logic to check whether a cell being copied is part of a pinned row or a regular row, retrieve the data and copy it to the clipboard, like in this example