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

NoRowsOverlay slot throws when passed undefined but types allow it #10933

Open
scamden opened this issue Nov 7, 2023 · 0 comments · Fixed by #10934
Open

NoRowsOverlay slot throws when passed undefined but types allow it #10933

scamden opened this issue Nov 7, 2023 · 0 comments · Fixed by #10934
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!

Comments

@scamden
Copy link

scamden commented Nov 7, 2023

Steps to reproduce

Link to live example: (required)

Steps:

  1. Make a grid with no rows
  2. Pass NoRowsOverlay slot with undefined

Current behavior

MUI throws error and crashes

Expected behavior

MUI just renders the default norows component

Context

We are conditionally passing this slot based on some other data in the component. Previously this worked fine but now crashes in v6.

Your environment

npx @mui/envinfo
System:
    OS: macOS 14.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 64.44 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nodenv/versions/18.12.1/bin/node
    Yarn: 1.22.19 - ~/Library/pnpm/yarn
    npm: 8.5.1 - ~/.nodenv/versions/18.12.1/bin/npm
    pnpm: 6.32.11 - ~/.nodenv/versions/18.12.1/bin/pnpm
  Managers:
    Cargo: 1.63.0 - ~/.cargo/bin/cargo
    Homebrew: 4.1.18 - /opt/homebrew/bin/brew
    pip3: 22.2.2 - ~/.pyenv/shims/pip3
    RubyGems: 3.0.3.1 - /usr/bin/gem
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 15.0.0 - /usr/bin/gcc
    Git: 2.40.0 - /opt/homebrew/bin/git
    Clang: 15.0.0 - /usr/bin/clang
    Curl: 8.1.2 - /usr/bin/curl
  Servers:
    Apache: 2.4.56 - /usr/sbin/apachectl
  Virtualization:
    VirtualBox: 7.0.8 - /usr/local/bin/vboxmanage
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
  IDEs:
    VSCode: 1.84.1 - /opt/homebrew/bin/code
    Vim: 9.0 - /usr/bin/vim
    Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Go: 1.19.2 - /opt/homebrew/bin/go
    Perl: 5.30.3 - /usr/bin/perl
    Python: 3.9.9 - /Users/scamden/.pyenv/shims/python
    Python3: 3.9.9 - /Users/scamden/.pyenv/shims/python3
    Ruby: 2.6.10 - /usr/bin/ruby
    Rust: 1.63.0 - /Users/scamden/.cargo/bin/rustc
  Databases:
    PostgreSQL: 14.8 - /opt/homebrew/opt/postgresql@14/bin/postgres
    SQLite: 3.39.5 - /usr/bin/sqlite3
  Browsers:
    Chrome: 119.0.6045.105
    Safari: 17.1

Search keywords: datagrid norowsoverlay
Order ID: 77647

@scamden scamden added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 7, 2023
@cherniavskii cherniavskii added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants