-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
data-table: fixes warning about missing key prop #1778
Conversation
Nice! Is there a way for our tests to catch this warning so we can ensure it doesn't pop up again as we change things?
Agreed - though at some point soon we will want to make react 17 an option you can enable for any given Dash app, at first just for our own testing purposes. |
Via a Selenium test, it would probably be possible to check console logs and assert they're empty. |
Actually, for this to work, we also need to use a development bundle of React in the tests. I'm not sure what's the best way to do that. |
We serve the dev version of react etc when you're in debug mode. In tests we typically disable hot reloading when we turn on debug, like: dash/tests/integration/devtools/test_devtools_ui.py Lines 72 to 78 in 8c193bc
|
Done in 50f8c04 Here's proof that this test detects the warning: https://app.circleci.com/pipelines/github/plotly/dash/2751/workflows/f3be563b-0da9-44e2-a0e1-4f0ad7796b2b/jobs/45091 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it, thanks for taking care of this! Please add a quick changelog entry, then 💃
Closes plotly/dash-table#860 and potentially #1433
As pointed out in plotly/dash-table#690 (comment), in order to see the warnings on the demo page, we need to use React's dev bundles (see 3eac50a). I also changed the version of the React bundle to match the one used in
package-lock.json
. I don't know if this should stay in the PR but @chabb made a good argument for it to stay in.The fix itself can be found in a25cca9. It adds the one missing
key
prop. After this commit, the missing key warning disappears in the demo page!cc @alexcjohnson
Contributor Checklist
optionals
CHANGELOG.md