i have the most simple example you can imagine and it just renders the column headers and the height of the container div just increases infinitely.
import React, { ReactElement } from 'react'
import DataGrid from 'react-data-grid'
export default function WorkoutsTest(props): ReactElement {
const columns = [
{ key: 'id', name: 'ID' },
{ key: 'title', name: 'Title' },
]
const rows = [
{ id: 0, title: 'Example' },
{ id: 1, title: 'Demo' },
]
return (
<>
<DataGrid columns={columns} rows={rows} h></DataGrid>
</>
)
}
Can you please create a codesandbox example?
Add ...
import 'react-data-grid/dist/react-data-grid.css'
... just after the import DataGrid line and see if that doesn't fix your issue. I was experiencing the same trouble.
Most helpful comment
Add ...
import 'react-data-grid/dist/react-data-grid.css'... just after the import DataGrid line and see if that doesn't fix your issue. I was experiencing the same trouble.