mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
3.92k stars 1.19k forks source link

page used @mui/x-data-grid throw error "Unexpected Application Error! e.current.state.rows.dataRowIds.at is not a function" #13722

Open elevenwin opened 4 days ago

elevenwin commented 4 days ago

Steps to reproduce

Code:

import { DataGrid } from '@mui/x-data-grid';
export default ()=>(
<DataGrid sx={{ height: '100vh', width: '100%', padding: '10px' }}
    columns={[
        {field:'name',headerName:'name', width: 120},
        {field:'age',headerName:'age', width: 120},

    ]}
    rows={[
        { id:1,name:'sam',age:12 },
        { id:2,name:'amy',age:15 }
    ]} />
)

Steps:

  1. yarn build
  2. open on android's webview 3.page show:Unexpected Application Error! e.current.state.rows.dataRowIds.at is not a function

Current behavior

No response

Expected behavior

No response

Context

No response

Your environment

package.json "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "@mui/icons-material": "^5.15.18", "@mui/material": "^5.15.18", "@mui/x-data-grid": "^7.8.0", "@mui/x-date-pickers": "^7.6.2", "@reduxjs/toolkit": "^2.2.5", "@types/crypto-js": "^4.2.2", "@types/node": "^20.14.9", "react": "^18.2.0", "react-dom": "^18.2.0", "react-redux": "^9.1.2", "react-router-cache-route": "^1.13.0", "react-router-dom": "^6.16.0" }, "devDependencies": { "@types/react": "^18.2.18", "@types/react-dom": "^18.2.7", "@typescript-eslint/eslint-plugin": "^6.2.1", "@typescript-eslint/parser": "^6.2.1", "@vitejs/plugin-react": "^4.0.4", "eslint": "^8.46.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "typescript": "^5.0.2", "vite": "^4.4.8" }

Search keywords: @mui/x-data-grid

MBilalShafi commented 3 days ago

Hey @elevenwin,

Could you provide a stripped-down reproduction test case using the latest version? A live example would be fantastic! ✨

For your convenience, our documentation offers templates and guides on creating targeted examples: Support - Bug reproduction

Clean, functional code with minimal dependencies is most helpful. Complex code can make it tougher to pinpoint the exact issue. Sometimes, simply going through the process of creating a minimal reproduction can even clarify the problem itself!

Thanks for your understanding! 🙇🏼

elevenwin commented 3 days ago

UI.zip it works on pc browser,but mobile browser.