简体   繁体   English

React MUI 错误缺少数组 react/jsx-key 中元素的“键”道具

[英]React MUI Error Missing "key" prop for element in array react/jsx-key

{
    field: 'deletedAt',
    headerName: 'DeleteAt',
    type: 'actions',
    width: 200,
    editable: false,
    getActions: () => [<GridActionsCellItem icon={<DeleteIcon />} label="Delete" />],
  },
return (
    <div style={{ height: 720, width: '100%' }}>
      <DataGridPro
        rows={customizings}
        columns={columns}
        getRowId={(row) => row._id}
        experimentalFeatures={{ newEditingApi: true }}     
        components={{ Toolbar: GridToolbar }}
        initialState={{ pinnedColumns: { right: ['actions'] } }}
      />
    </div>
  );

I want to add this icon to the contents of the datagrid table, but I am getting a back key error.我想将此图标添加到数据网格表的内容中,但出现返回键错误。 How can I solve?我该如何解决?

Antwort: Name of field must be actions Antwort:字段名称必须是动作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:在迭代器 react/jsx-key 中缺少元素的“key”道具 - Error: Missing "key" prop for element in iterator react/jsx-key React 中的迭代器 react/jsx-key 中缺少元素的“key”属性 - Missing “key” prop for element in iterator react/jsx-key in React eslint:缺少迭代器中元素的“key”道具(react/jsx-key) - eslint: Missing "key" prop for element in iterator (react/jsx-key) 如何解决错误问题:当我 map react-icons 时,数组 react/jsx-key 中的元素缺少“key”道具? - how to solve problem with Error: Missing "key" prop for element in array react/jsx-key when I map react-icons? React esLint 错误:缺少数组中元素的“key”道具 - React esLint error: Missing "key" prop for element in array React JSX:条件数组中的唯一键提示 - React JSX: Unique Key Prop in Conditional Array 反应项目脚本 linter 错误迭代器中缺少元素的“关键”道具 - React project script linter error Missing "key" prop for element in iterator 无法找到哪个孩子缺少关键道具的反应错误 - Cant find react error which child is missing key prop 如何更改保存在数组中的 React 元素的道具? JSX - How can I change a prop on a React Element saved in an Array? JSX 如何在 React 中向 jsx 元素数组的最后一个元素添加道具? - How to add a prop to the last element of an array of jsx elements in React?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM