Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Clicking on a markdown link should open the link rather than selecting the cell #710

Closed
chriddyp opened this issue Mar 2, 2020 · 5 comments · Fixed by #787
Closed

Clicking on a markdown link should open the link rather than selecting the cell #710

chriddyp opened this issue Mar 2, 2020 · 5 comments · Fixed by #787
Assignees
Labels
dash-type-bug Something isn't working as intended dash-type-enhancement New feature or request size: 3

Comments

@chriddyp
Copy link
Member

chriddyp commented Mar 2, 2020

Users will use editable=False for read-only tables and therefore shouldn't select them. It feels awkward to have a cell become selected when the table otherwise looks and feels read-only.

In read-only tables, users will be selecting cells to:

  • Copy and paste text - where they'll expect the standard "click and drag" text selection to work
  • Click on embedded markdown links

Both of these interactions feel awkward with the current cell selection behavior.

We could introduce a new property like "cell_selectable", but I believe that this property should be coerced to False if editable=False

@antoinerg
Copy link

@Marc-Andre-Rivet for your information, I also would like to turn off the possibility of selecting cells. Also, I need a way to open markdown link by clicking once on them. Right now, we need to click twice which is weird.

@Marc-Andre-Rivet
Copy link
Contributor

Marc-Andre-Rivet commented Apr 16, 2020

Having editable=False coerce cell_selectable=False would be a breaking change for the table. There's a lot of situations where not wanting to edit does not mean not wanting to navigate.

I think the Copy and paste text case is fixed by #728.
Agree with the MD link click requiring a single click to trigger.

For now I agree that having a cell_selectable: bool prop is probably the only way we can do this without breaking the API. For a 5.x major update, would be good to combine editable+cell_selectable into a single mode prop that doesn't allow for invalid combinations (eg. editable=True, selectable=False)

Making the size estimate fairly large because I'm not sure what the MD fix will require.

@Marc-Andre-Rivet Marc-Andre-Rivet added dash-type-bug Something isn't working as intended dash-type-enhancement New feature or request size: 3 labels Apr 16, 2020
@antoinerg
Copy link

Agree with the MD link click requiring a single click to trigger.

Great! @Marc-Andre-Rivet should we make a separate issue for this one?

@chriddyp
Copy link
Member Author

Agree with the MD link click requiring a single click to trigger.
Making the size estimate fairly large because I'm not sure what the MD fix will require.

Alright, I'll update this issue to be focused on just getting clicking on a markdown link to work directly

@chriddyp chriddyp changed the title When editable=False, cells shouldn't be selectable Clicking on a markdown link should open the link rather than selecting the cell Apr 24, 2020
@Marc-Andre-Rivet Marc-Andre-Rivet self-assigned this May 8, 2020
@Dekermanjian
Copy link

Hello, I am adding this comment into this issue as it seems very closely related. There also should be an option to allow links to open in a new tab, and I believe it should be the default option. It is unlikely that a user will want to click on a link in a data-table and be directed away from the table.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dash-type-bug Something isn't working as intended dash-type-enhancement New feature or request size: 3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants