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

[DataGrid] Controlled selection example throws multiple selection error #2193

Closed
2 tasks done
Tai-Iro opened this issue Jul 22, 2021 · 1 comment · Fixed by #2197
Closed
2 tasks done

[DataGrid] Controlled selection example throws multiple selection error #2193

Tai-Iro opened this issue Jul 22, 2021 · 1 comment · Fixed by #2197
Labels
component: data grid This is the name of the generic UI component, not the React module! regression A bug, but worse

Comments

@Tai-Iro
Copy link

Tai-Iro commented Jul 22, 2021

The DataGrid example from the docs for controlled selection works fine on the page and in sand box, but throws an error to the console about requiring a paid version. The Checkbox Selection example above it does not throw an error, while also allowing multiple selections (code sandbox).
Everything functions as expected, but it still logs an error after to this change: https://github.com/mui-org/material-ui-x/pull/1823/files#diff-36939e58755c91e3693a4f18aa7796b137ba1e32f65357a940fb358286048088R247

It just appears that a free feature is suddenly not free, without any warning, despite it not being made clear in the docs and the code still running as expected.

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

Selections work fine, but still logs an error.

Expected Behavior 🤔

No error is thrown, like for the Checkbox Selection example

Steps to Reproduce 🕹

Steps:

  1. Run the code for the Controlled Selection example (forked code sandbox)
  2. Select more than one item
  3. Check log to show it still list multiple items, despite throwing an error

Context 🔦

I have an app that allows users to select items to batch delete from a database. After 4.0.0-alpha.34, that started throwing this error.

Your Environment 🌎

`npx @material-ui/envinfo`
System:
    OS: macOS 11.3
  Binaries:
    Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
  Browsers:
    Chrome: 91.0.4472.164
    Edge: 91.0.864.71
    Firefox: 89.0.2
    Safari: 14.1
  npmPackages:
    @material-ui/core: ^4.12.1 => 4.12.2 
    @material-ui/data-grid: ^4.0.0-alpha.34 => 4.0.0-alpha.34 
    @material-ui/styles:  4.11.4 
    @material-ui/system:  4.12.1 
    @material-ui/types:  5.1.0 
    @material-ui/utils:  4.11.2 
    @types/react:  17.0.9 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 

Order id 💳

@Tai-Iro Tai-Iro added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 22, 2021
@Tai-Iro
Copy link
Author

Tai-Iro commented Jul 22, 2021

According to the comment #1823 (comment) by @m4theushw, it should allow multiple selection using checkboxes without a warning.

@m4theushw m4theushw added component: data grid This is the name of the generic UI component, not the React module! regression A bug, but worse and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 22, 2021
@m4theushw m4theushw changed the title Controlled selection example throws multiple selection error [DataGrid] Controlled selection example throws multiple selection error Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! regression A bug, but worse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants