React-data-grid: "^7.0.0-canary.33", doesn't work

Created on 7 Dec 2020  路  3Comments  路  Source: adazzle/react-data-grid

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>
        </>
    )
}
Needs Examples

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.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings