-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiDataGrid] Add support for copying the focused cell's value with keyboard shortcut only #6561
Comments
Hi @davismcphee! We discussed this in our EUI sync today and being able to As a heads up however, it's currently a medium priority for us, unless you have a use case for multiple teams/products that would bump it to a high. This means we don't currently have an ETA for this - but if you're interested in open source contributing to EuiDataGrid, we'd definitely take a PR on this! |
@cee-chen Thanks for the update, and I'm glad to hear the EUI team agrees that it would be a useful addition! As of right now we don't have an urgent need for the functionality since we at least have a workaround implemented in Discover using a |
This comment was marked as off-topic.
This comment was marked as off-topic.
@jughosta it's not clear to me from those threads whether or not those users are complaining about the ability to use a keyboard shortcut to copy the text, or if said data grid implementations are simply missing a clickable copy cell action entirely. This issue is for the former (cmd/ctrl+C to copy) - the latter is up to your team to implement. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed. |
Just bumping this one to prevent staleness since it's still a valuable feature to have 🙂 |
Totally agreed - any chance you'd be interested in contributing the feature to EUI? 😄 |
I'm definitely interested! Just not sure yet if I'll be able to find time to work on it near term 😅 |
All good! I know that feeling hahaa 🫠 |
@cee-chen We have this labeled as a "Large" effort. Do you still think this is a large amount of work? |
I think anything involving EuiDataGrid is a large effort 😅 But yes, since I think the API on this one will be fairly complex since it will involve adding a new prop allowing consumers to pass us copyable content and falling back to inner text if not. |
@davismcphee Our stalebot went rogue and closed this unintentionally - but just curious, would you consider this feature request moot since copying cells directly now works as of #8019? Can we go ahead and leave it closed? |
@cee-chen Thanks for the ping. While #8019 is a great improvement, personally I think this is still a valuable feature for easily copying entire cell values, vs having to manually highlight the text to copy. It seems especially useful for cells with truncated content where it's trickier to select the entire value, and for keyboard users. It's also a common pattern in other data grids I've used, and we've encountered users in Discover with similar expectations. |
We're working on improving copy/paste support for the Discover data grid (elastic/kibana#149525), and we think there's an opportunity to improve general support for it in the
EuiDataGrid
.Rather than the user having to manually highlight the entirety of the cell value to copy it, or expanding the cell and highlighting the popover value, both of which can be difficult (especially when there are cell actions or spaces in the text), it would be convenient to offer built-in support for copying the focused cell's value. I believe this should be possible by hooking into the browser's copy event: https://developer.mozilla.org/en-US/docs/Web/API/Element/copy_event.
Two notes about this request:
EuiDataGrid
also offered support for customizing this behaviour via anonCellCopy
callback or similar.Here's a 10-minute hack job I threw together to demonstrate the concept that can be pasted into the
EuiDataGrid
docs page or anywhere else containing anEuiDataGrid
:The text was updated successfully, but these errors were encountered: