我是Next js的新手,目前我正在尝试在我的应用程序中使用igr数据网格。当我尝试在react中使用igr数据网格时,我收到错误**“ReferenceError:未定义HTML元素”**
如何才能做到这一点?
我的代码:
import { IgrDataGrid } from "igniteui-react-grids";
import { IgrTextColumn } from "igniteui-react-grids";
const details = [
{
Name: "Jack",
Company : "Google",
},
{
Name: "Jack",
Company : "Google",
},
{
Name: "Jack",
Company : "Google",
},
{
Name: "Jack",
Company : "Google",
},
{
Name: "Jack",
Company : "Google",
},
{
Name: "Jack",
Company : "Google",
},
];
const table = () => {
return (
<h1>USER DETAILS</h1>
<div>
<div className="container">
{
<IgrDataGrid dataSource={details}>
<IgrTextColumn field="Name" horizontalAlignment="center" />
<IgrTextColumn field="Company" horizontalAlignment="center" />
</IgrDataGrid>
}
</div>
</div>
);
};
export default table;
1条答案
按热度按时间koaltpgm1#
查看下面的代码。