最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Attempted import error: 'GridActionsCellItem' is not exported from '@muix-data-grid&#39

programmeradmin3浏览0评论

I am trying to import 'GridActionsCellItem' from '@mui/x-data-grid' as:

import { GridActionsCellItem } from '@mui/x-data-grid';

But it shows error as:

Attempted import error: 'GridActionsCellItem' is not exported from '@mui/x-data-grid'.

I am copying the official documentation code from here.

Can anyone help me with this?

I am trying to import 'GridActionsCellItem' from '@mui/x-data-grid' as:

import { GridActionsCellItem } from '@mui/x-data-grid';

But it shows error as:

Attempted import error: 'GridActionsCellItem' is not exported from '@mui/x-data-grid'.

I am copying the official documentation code from here.

Can anyone help me with this?

Share Improve this question edited Mar 27 at 6:45 Olivier Tassinari 8,6916 gold badges25 silver badges28 bronze badges asked Sep 27, 2021 at 17:11 RupakRupak 5418 silver badges18 bronze badges 4
  • What version of x-data-grid do you have in your package.json ? – Alan Commented Sep 27, 2021 at 17:16
  • "@mui/x-data-grid": "^4.0.0", – Rupak Commented Sep 28, 2021 at 1:34
  • 1 The documentation is using version"5.0.0-beta.2" -- the "next" version in npm as opposed to the "latest" version (which is "4.0.0"). GridActionsCellItem doesn't exist in version "4.0.0". – Ryan Cogswell Commented Sep 28, 2021 at 1:40
  • so, can u tell me how can i update to 5.0.0-bete.2 – Rupak Commented Sep 28, 2021 at 1:54
Add a ment  | 

1 Answer 1

Reset to default 5

I solved this problem by upgrading my '@mui/x-data-grid' from 4.4.to '5.0.0-beta.2'. Just replace the version of your @mui/x-data-grid package in your package.json with ^5.0.0-beta.2 and it should work.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论