Table: Allow text selection
- Dominant language
- TypeScript
- Stars
- 15.9k
- Forks
- 1.6k
- Avg merge
- 3d 9m
- Merged PRs (30d)
- 59
Description
# 🙋 Feature Request
There is currently no way to enable selection of text in a component that is using react-aria table hooks.
## 🤔 Expected Behavior
A prop to allow text selection in a table (might make sense to only allow this if selectionMode is none)
## 😯 Current Behavior
Currently, there is no way to enable text selection in a table.
## 💁 Possible Solution
I have tried to use the new enableTextSelection in usePress, and applying that to a TableRow, without any luck. There are probably some event handlers preventing this from being a workaround.
I am not sure how the logic for enabling selection of rows works, but there should be a prop to allow text selection in "regular" tables that do not have selectionMode.
## 🔦 Context
I am currently working on a UI library using react-arias useTable, and we want the user to have the ability to select, copy and paste text in a table with selectionMode "none".
## 💻 Examples
I have a comparison table containing rows of products, and i wish to let the users copy and paste text (product details, prices etc).
This table does not require selectionMode (highlight/checkbox functionality), but it does use the sorting and other functionality of react-aria table hooks.
## 🧢 Your Company/Team
## 🎁 Tracking Ticket (optional)
Contributor guide
Assessment
This issue has not been assessed yet.