# @coreui/react-data-grid

High-performance React data grid for CoreUI — sorting, filtering, selection,
pagination, column resizing/reordering/pinning, inline editing, CSV export, and
server-side data, virtualized to 100,000 rows.

Load the shared grid stylesheet from `@coreui/data-grid` (installed
automatically). Use `data-grid.css` next to the CoreUI stylesheet
(`@coreui/coreui` or `@coreui/coreui-pro` ≥ 5), which supplies the base `.table`,
`.btn` and form styles; without CoreUI on the page use
`data-grid.standalone.css` instead, which carries those base styles itself for
~2.7 kB gzip.

## Usage

```tsx
import { CDataGrid } from '@coreui/react-data-grid'
import '@coreui/data-grid/dist/css/data-grid.css'

<CDataGrid
  columns={[
    { key: 'name', label: 'Name' },
    { key: 'role', label: 'Role' },
    { key: 'actions', label: '', sortable: false, render: (item) => <button>Edit</button> },
  ]}
  items={items}
  itemKey={(item) => String(item.id)}
  columnFilters
  globalFilter
  rowSelection
  onSelectionChange={(rowSelection, selectedItems) => console.log(selectedItems)}
/>
```

## License

Commercial — see [LICENSE](LICENSE).
