Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,6 @@

Note: This is a stopgag prop, full implementation of sorting overrides will most probably deprecate it.

Default value is False.
Default value is False.

## RC10 - Fix double click regression
6 changes: 3 additions & 3 deletions dash_table/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_table/demo.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_table/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash-table",
"version": "3.0.0rc9",
"version": "3.0.0rc10",
"description": "Dash table",
"main": "build/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash-table",
"version": "3.0.0rc9",
"version": "3.0.0rc10",
"description": "Dash table",
"main": "build/index.js",
"scripts": {
Expand Down
13 changes: 11 additions & 2 deletions src/dash-table/components/CellFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,27 @@ export default class CellFactory {
const {
editable,
is_focused,
row_deletable,
row_selectable,
setProps
} = this.props;

if (!editable) {
return;
}

// visible col indices
const columnIndexOffset =
(row_deletable ? 1 : 0) +
(row_selectable ? 1 : 0);

const cellLocation: [number, number] = [idx, i + columnIndexOffset];

if (!is_focused) {
e.preventDefault();
const newProps = {
selected_cell: [[idx, i]],
active_cell: [idx, i],
selected_cell: [cellLocation],
active_cell: cellLocation,
is_focused: true
};
setProps(newProps);
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/cypress/integration/dash_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ describe('dash basic', () => {
});
});
});

it('can get cell with double click', () => {
DashTable.getCell(3, 3).within(() => cy.get('div').dblclick());

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.

Not sure why I can click on the cell itself but need to dblclick on the child both handlers are defined on the cell itself... otherwise this does not work.

DashTable.getCell(3, 3).should('have.class', 'focused');
});
});
2 changes: 2 additions & 0 deletions tests/e2e/dash/v_be_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
{'id': 12, 'name': 'Timely response?'},
{'id': 13, 'name': 'Consumer disputed?'}
],
n_fixed_columns=2,
n_fixed_rows=1,

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.

Changing the test case to have fixed rows/columns as this is necessary for the bug to activate.

row_selectable=True,
row_deletable=True,
sorting=True,
Expand Down