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

[docs] Error during tab change in DataGrid docs #974

Closed
2 tasks done
SaskiaKeil opened this issue Feb 2, 2021 · 0 comments · Fixed by #975
Closed
2 tasks done

[docs] Error during tab change in DataGrid docs #974

SaskiaKeil opened this issue Feb 2, 2021 · 0 comments · Fixed by #975
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation

Comments

@SaskiaKeil
Copy link
Contributor

While starting the docs locally an error appears if you switch between JS and TS display in the DataGrid chapters.
It seems the overall functionality is not affected, but you see an overlay error message and tracebacks in the console.

  • 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 😯

An error appears if you switch between JS and TS display in the DataGrid chapters (e.g. in filtering).

useFilter.ts?8d40:74 Uncaught TypeError: Cannot read property 'getApplyFilterFn' of undefined
    at Object.eval [as applyFilter] (useFilter.ts?8d40:74)
    at EventEmitter.apiRef.current.<computed> [as applyFilter] (useApiMethod.ts?129e:27)
    at eval (useFilter.ts?8d40:127)
    at Array.forEach (<anonymous>)
    at eval (useFilter.ts?8d40:126)
    at eval (useFilter.ts?8d40:173)
    at eval (useFilter.ts?8d40:253)
    at Array.forEach (<anonymous>)
    at Object.eval [as setFilterModel] (useFilter.ts?8d40:253)
    at EventEmitter.apiRef.current.<computed> [as setFilterModel] (useApiMethod.ts?129e:27)
    at eval (useFilter.ts?8d40:293)
    at commitHookEffectListMount (react-dom.development.js?f8c1:19731)
    at commitPassiveHookEffects (react-dom.development.js?f8c1:19769)
    at HTMLUnknownElement.callCallback (react-dom.development.js?f8c1:188)
    at HTMLUnknownElement.dispatchEvent (<anonymous>)
    at Object.invokeGuardedCallbackDev (react-dom.development.js?f8c1:237)
    at invokeGuardedCallback (react-dom.development.js?f8c1:292)
    at flushPassiveEffectsImpl (react-dom.development.js?f8c1:22853)
    at unstable_runWithPriority (scheduler.development.js?bacd:653)
    at runWithPriority$1 (react-dom.development.js?f8c1:11039)
    at flushPassiveEffects (react-dom.development.js?f8c1:22820)
    at performSyncWorkOnRoot (react-dom.development.js?f8c1:21737)
    at eval (react-dom.development.js?f8c1:11089)
    at unstable_runWithPriority (scheduler.development.js?bacd:653)
    at runWithPriority$1 (react-dom.development.js?f8c1:11039)
    at flushSyncCallbackQueueImpl (react-dom.development.js?f8c1:11084)
    at flushSyncCallbackQueue (react-dom.development.js?f8c1:11072)
    at discreteUpdates$1 (react-dom.development.js?f8c1:21893)
    at discreteUpdates (react-dom.development.js?f8c1:806)
    at dispatchDiscreteEvent (react-dom.development.js?f8c1:4168)
eval @ useFilter.ts?8d40:74
apiRef.current.<computed> @ useApiMethod.ts?129e:27
eval @ useFilter.ts?8d40:127
eval @ useFilter.ts?8d40:126
eval @ useFilter.ts?8d40:173
eval @ useFilter.ts?8d40:253
eval @ useFilter.ts?8d40:253
apiRef.current.<computed> @ useApiMethod.ts?129e:27
eval @ useFilter.ts?8d40:293
commitHookEffectListMount @ react-dom.development.js?f8c1:19731
commitPassiveHookEffects @ react-dom.development.js?f8c1:19769
callCallback @ react-dom.development.js?f8c1:188
invokeGuardedCallbackDev @ react-dom.development.js?f8c1:237
invokeGuardedCallback @ react-dom.development.js?f8c1:292
flushPassiveEffectsImpl @ react-dom.development.js?f8c1:22853
unstable_runWithPriority @ scheduler.development.js?bacd:653
runWithPriority$1 @ react-dom.development.js?f8c1:11039
flushPassiveEffects @ react-dom.development.js?f8c1:22820
performSyncWorkOnRoot @ react-dom.development.js?f8c1:21737
eval @ react-dom.development.js?f8c1:11089
unstable_runWithPriority @ scheduler.development.js?bacd:653
runWithPriority$1 @ react-dom.development.js?f8c1:11039
flushSyncCallbackQueueImpl @ react-dom.development.js?f8c1:11084
flushSyncCallbackQueue @ react-dom.development.js?f8c1:11072
discreteUpdates$1 @ react-dom.development.js?f8c1:21893
discreteUpdates @ react-dom.development.js?f8c1:806
dispatchDiscreteEvent @ react-dom.development.js?f8c1:4168
21:41:38.226 

Expected Behavior 🤔

Switching between JS and TS display should work without any errors

Steps to Reproduce 🕹

yarn && yarn docs:dev

Steps:

  1. yarn && yarn docs:dev
  2. Open http://0.0.0.0:3001/components/data-grid/filtering/
  3. Interact with the JS and TS tabs in the code view

I compared with the live hosted version and there it seems to be fine.
It might be an issue of the dev environment.

Context 🔦

I ran into this issue while working on the changes submitted in #973.
First I thought that this was related to my own changes, but I was able to reproduce it on master.

Your Environment 🌎

`npx @material-ui/envinfo`
  System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 1.27 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 15.2.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.0.10 - /usr/local/bin/npm
  Managers:
    Gradle: 6.7 - /usr/local/bin/gradle
    Homebrew: 2.5.0 - /usr/local/bin/brew
    Maven: 3.6.3 - /usr/local/bin/mvn
    pip2: 19.3.1 - /usr/local/bin/pip2
    pip3: 20.2.4 - /usr/local/bin/pip3
    RubyGems: 3.0.3 - /usr/bin/gem
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 4.2.1 - /usr/bin/gcc
    Git: 2.24.3 - /usr/bin/git
    Clang: 1200.0.32.21 - /usr/bin/clang
    FFmpeg: 4.3.1 - /usr/local/bin/ffmpeg
  Servers:
    Apache: 2.4.41 - /usr/sbin/apachectl
  Virtualization:
    Docker: 20.10.2 - /usr/local/bin/docker
  SDKs:
    Android SDK:
      Build Tools: 25.0.2
  IDEs:
    Nano: 2.0.6 - /usr/bin/nano
    Vim: 8.2 - /usr/local/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Go: 1.13.5 - /usr/local/bin/go
    Java: 1.8.0_202 - /usr/bin/javac
    Perl: 5.30.0 - /usr/local/bin/perl
    PHP: 7.3.11 - /usr/bin/php
    Python: 2.7.17 - /usr/local/bin/python
    Python3: 3.8.5 - /usr/local/bin/python3
    Ruby: 2.6.3 - /usr/bin/ruby
  Databases:
    MySQL: 10.15 - /usr/local/bin/mysql
    PostgreSQL: 13.1 - /usr/local/bin/postgres
    SQLite: 3.28.0 - /usr/bin/sqlite3
  Browsers:
    Chrome: 88.0.4324.96
    Firefox Developer Edition: 84.0
    Safari: 14.0.2
  Monorepos:
    Yarn Workspaces: 1.22.10
    Lerna: 3.22.1

Let me know if you need any other info :)

@SaskiaKeil SaskiaKeil added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 2, 2021
dtassone added a commit to dtassone/material-ui-x that referenced this issue Feb 3, 2021
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work 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 Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants