Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

3.0 click behavior#79

Merged
Marc-Andre-Rivet merged 10 commits intomasterfrom
3.0-click-behavior
Sep 12, 2018
Merged

3.0 click behavior#79
Marc-Andre-Rivet merged 10 commits intomasterfrom
3.0-click-behavior

Conversation

@Marc-Andre-Rivet
Copy link
Copy Markdown
Contributor

This brings the overall behavior closer to Excel's and reduces expectation gap for the end-user.
-> single click: focuses on the input and selects all content
-> click a second time to insert at a specific position

Marc-André Rivet added 2 commits September 12, 2018 07:30

if (active && this.refs.textInput) {
(this.refs.textInput as HTMLElement).focus();
if (active && document.activeElement !== input) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only force selection when the cell/input is first selected by the user

{
"name": "dash-table",
"version": "3.0.0rc12",
"version": "3.0.0rc13",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump version

Copy link
Copy Markdown
Contributor

@wbrgss wbrgss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implements @Marc-Andre-Rivet's expected behaviour well.

However, I still think a dblclick event should still be handled the same as the "click, click again" behaviour mentioned above, in order to fully resolve #77 (thoughts @cldougl ?). It might be tricky as a dblclick will trigger two click events and one dblclick, for three events total.

best I've got so far

suggests this is a WIP. So approval from me pending my (nit) comment below about the CHANGELOG.

CHANGELOG.md Outdated
Issue: https://github.com/plotly/dash-table/issues/73
Issue: https://github.com/plotly/dash-table/issues/76

## RC13 - Modify click & dblclick behavior
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's misleading to state that dblclick event handling has been modified in this PR, as dblclick is a technical term for the event and its behaviour remains the same. I would prefer "double click", "x2 click", "sequential click" etc. just to be crystal clear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the changelog. You are right, this is not a definitive answer, just the simplest implementation that goes one step towards the desired one.

@Marc-Andre-Rivet
Copy link
Copy Markdown
Contributor Author

@wbrgss Update changelog.md as per your comments, let me know if good enough

@cldougl
Copy link
Copy Markdown
Member

cldougl commented Sep 12, 2018

agreed on:

I still think a dblclick event should still be handled the same as the "click, click again" behaviour mentioned above

as this is a semi-WIP I think this is great so far as it brings the behaviour closer to what excel users will expect. We should still be open about further developing the click/dblclick events as more people continue to use the table

@cldougl
Copy link
Copy Markdown
Member

cldougl commented Sep 12, 2018

lgtm 💃

@Marc-Andre-Rivet Marc-Andre-Rivet merged commit 7bf8658 into master Sep 12, 2018
@Marc-Andre-Rivet Marc-Andre-Rivet deleted the 3.0-click-behavior branch October 12, 2018 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants