Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Table codesandbox example not working #24217

Closed
2 tasks done
brno32 opened this issue Jan 1, 2021 · 2 comments · Fixed by #24218
Closed
2 tasks done

Data Table codesandbox example not working #24217

brno32 opened this issue Jan 1, 2021 · 2 comments · Fixed by #24218
Labels
docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@brno32
Copy link
Contributor

brno32 commented Jan 1, 2021

At https://material-ui.com/components/tables/#data-table, if you go to the codesandbox https://codesandbox.io/s/0iyrn, the sandbox throws an error.

it appears the package.json is missing "@material-ui/core": "latest"

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

The sandbox does not load

Expected Behavior 🤔

The sandbox should load

Steps to Reproduce 🕹

Steps:

  1. go to https://codesandbox.io/s/0iyrn

Context 🔦

n/a

Your Environment 🌎

n/a

@brno32 brno32 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 1, 2021
@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 1, 2021
@oliviertassinari
Copy link
Member

@brno32 Thanks for reporting the issue. I had forgotten about this case. What do you think about this fix?

diff --git a/docs/src/modules/utils/helpers.js b/docs/src/modules/utils/helpers.js
index 970477d98b..c8b34b72e1 100644
--- a/docs/src/modules/utils/helpers.js
+++ b/docs/src/modules/utils/helpers.js
@@ -97,6 +97,10 @@ function includePeerDependencies(deps, versions) {
     newDeps['@material-ui/core'] = versions['@material-ui/core'];
   }

+  if (newDeps['@material-ui/data-grid']) {
+    newDeps['@material-ui/core'] = versions['@material-ui/core'];
+  }
+
   if (window.muiDocConfig) {
     newDeps = window.muiDocConfig.csbIncludePeerDependencies(newDeps, { versions });
   }

Do you want to work on it? :)

@oliviertassinari oliviertassinari added the good first issue Great for first contributions. Enable to learn the contribution process. label Jan 1, 2021
@brno32
Copy link
Contributor Author

brno32 commented Jan 1, 2021

Do you want to work on it? :)

Sure! I'll dig around

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants