You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a DataTable is initialised with cell_selectable=False, cells no longer have a selected visual appearance and their contents are no longer copied to the clipboard (as expected), however for columns with a presentation attribute with value text, the text is still unable to be selected with the cursor and copied with control-C. Interestingly, this does work for markdown presentation (regardless of cell_selectable value).
Expected behavior
Text should be selectable (eg with the mouse) when appearing in DataTables initialised with cell_selectable=False and columns with presentation set to text
Did a little bit of digging in the browser dev tools, and it seems like removing the unfocused class from the div immediately wrapping the cell value fixes it. This is because of the following CSS selector that comes from Table.less:
If it's simply a matter of not having the unfocused class generated for cell values when cell_selectable is false, then I could try to put a PR together.
gvwilson
changed the title
[BUG] DataTable: when cell_selectable=False text in columns with text presentation cannot be selected
when cell_selectable=False text in columns with text presentation cannot be selected in data table
Aug 13, 2024
Describe the bug
When a
DataTable
is initialised withcell_selectable=False
, cells no longer have a selected visual appearance and their contents are no longer copied to the clipboard (as expected), however for columns with apresentation
attribute with valuetext
, the text is still unable to be selected with the cursor and copied with control-C. Interestingly, this does work formarkdown
presentation (regardless ofcell_selectable
value).Here's a relevant forum community post.
Expected behavior
Text should be selectable (eg with the mouse) when appearing in DataTables initialised with
cell_selectable=False
and columns withpresentation
set totext
Environment
The text was updated successfully, but these errors were encountered: