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

Re-render on changes to undefined props #785

Merged
merged 13 commits into from
Jun 17, 2020
Merged

Re-render on changes to undefined props #785

merged 13 commits into from
Jun 17, 2020

Conversation

Marc-Andre-Rivet
Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet commented May 27, 2020

For callback chain testing purposes. Also fixes a bug that causes the table to not re-render when a prop goes from being undefined -> defined.

@Marc-Andre-Rivet Marc-Andre-Rivet changed the title [WIP] State machine [WIP] Callback chain rework May 27, 2020
@Marc-Andre-Rivet Marc-Andre-Rivet marked this pull request as ready for review May 29, 2020 13:45
@@ -152,5 +152,8 @@ def update_graph(rows, selected_rows):
dash_duo.wait_for_element("#waitfor")

dash_duo.wait_for_element("#{}".format(IDS["table"]))
dash_duo.wait_for_element("#pop svg")
dash_duo.wait_for_element("#lifeExp svg")
dash_duo.wait_for_element("#gdpPercap svg")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Slight changes in timing / rendering require the test to be more specific and wait for the graph to be ready

@Marc-Andre-Rivet Marc-Andre-Rivet changed the title [WIP] Callback chain rework Callback chain rework + re-render on changes to undefined props Jun 11, 2020
@Marc-Andre-Rivet Marc-Andre-Rivet changed the title Callback chain rework + re-render on changes to undefined props Re-render on changes to undefined props Jun 15, 2020
@Marc-Andre-Rivet
Copy link
Contributor Author

@alexcjohnson With plotly/dash#1254 merged, the fix is now necessary.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃

});

it('should update on undefined -> defined state', () => {
assert(shouldComponentUpdate({}, {}, {}, { a: 0 }));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test fails without the added ...nextProps 8849e85#diff-aa707fa377faf64638e062a12fb52d85R13

@Marc-Andre-Rivet Marc-Andre-Rivet merged commit 755d752 into dev Jun 17, 2020
@Marc-Andre-Rivet Marc-Andre-Rivet deleted the state-machine branch June 17, 2020 17:55
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.

None yet

2 participants