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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,8 @@
Issue: https://github.com/plotly/dash-table/issues/77

First click selects the cell's content and will cause user input to override the cell content.
Second click into the cell will remove the selection and position the cursor accordingly.
Second click into the cell will remove the selection and position the cursor accordingly.

## RC14 - Empty dropdown setting value regression fix

Issue: https://github.com/plotly/dash-table/issues/83
2 changes: 1 addition & 1 deletion 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.0rc13",
"version": "3.0.0rc14",
"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.0rc13",
"version": "3.0.0rc14",
"description": "Dash table",
"main": "build/index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/core/comparer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
function isPlainObject(candidate: any) {
return typeof candidate === 'object' && candidate.constructor === Object;
return candidate !== undefined &&
candidate !== null &&
typeof candidate === 'object' &&

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.

typeof null is 'object', this caused an error to be thrown, adding check for undefined just so it's all very explicit

candidate.constructor === Object;
}

export function isEqual(obj1: object, obj2: object, deep: boolean = false) {
Expand Down
25 changes: 25 additions & 0 deletions tests/e2e/cypress/integration/edit_cell_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ describe('edit cell', () => {
cy.visit('http://localhost:8080');
});

it('can delete dropdown', () => {
DashTable.getCell(0, 8).trigger('mouseover');
DashTable.getCell(0, 8).within(() => cy.get('.Select-clear').click());
DashTable.getCell(0, 8).within(() => cy.get('.Select-placeholder').should('exist'));
});

it('can delete dropdown and set value', () => {
DashTable.getCell(0, 8).trigger('mouseover');
DashTable.getCell(0, 8).within(() => cy.get('.Select-clear').click());
DashTable.getCell(0, 8).within(() => cy.get('.Select-placeholder').should('exist'));

DashTable.getCell(0, 8).within(() => cy.get('div.Select').click()).then(() => {
DashTable.getCell(0, 8).within(() => {
cy.get('.Select-option').then($options => {
const target = $options[0];
if (target) {
cy.wrap(target).click({ force: true });
}
});
});
});

DashTable.getCell(0, 8).within(() => cy.get('.Select-placeholder').should('not.exist'));
});

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.

test for delete + test for delete + set value after


it('can edit dropdown', () => {
let initialValue: string;
let expectedValue: string;
Expand Down