MCPcopy Index your code
hub / github.com/Kuechlin/mantine-data-grid

github.com/Kuechlin/mantine-data-grid @v0.2.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.3 ↗ · + Follow
112 symbols 265 edges 60 files 0 documented · 0% updated 2y agov0.2.3 · 2023-06-09★ 17913 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Mantine Data Grid

Version

Data Grid component with Mantine UI and react-table v8.

Component is in alpha stage, there might be bugs and component api could change.

Mantine Data Grid discussion

Demo & Documentation

Install

With npm

npm i mantine-data-grid @mantine/core @mantine/dates @mantine/hooks dayjs

With pnpm

pnpm add mantine-data-grid @mantine/core @mantine/dates @mantine/hooks dayjs

Usage

import { DataGrid, stringFilterFn, numberFilterFn, dateFilterFn } from 'mantine-data-grid';

function Demo() {
  return (
    <DataGrid
      data={/* data source */}
      size="md"
      withGlobalFilter
      columns={[
        {
          accessorKey: 'text',
          header: 'Text that is too long for a Header',
          filterFn: stringFilterFn,
        },
        {
          header: 'Animal',
          columns: [
            { accessorKey: 'cat', filterFn: stringFilterFn },
            {
              accessorKey: 'fish',
              filterFn: stringFilterFn,
            },
          ],
        },
        {
          accessorKey: 'city',
          filterFn: stringFilterFn,
        },
        { accessorKey: 'value', filterFn: numberFilterFn },
        {
          accessorKey: 'date',
          cell: (cell) => cell.getValue()?.toLocaleDateString(),
          filterFn: dateFilterFn,
        },
      ]}
    />
  );
}

Contributing

Contribution to this project is welcom, feel free to submit a Pull Request.

Run locally

pnpm i

pnpm dev

Roadmap

  • [x] Simple Data Grid
  • [x] Virualized Data Grid
  • [x] Global Filter
  • [x] Column Filter
  • [x] string filter
  • [x] number filter
  • [x] date filter
  • [x] boolean filter
  • [x] custom fitler
  • [x] Column Sizing
  • [x] Column sorting
  • [ ] Scrolling
  • [x] Fixed Header
  • [ ] Column pinning
  • [ ] Column Ordering
  • [x] Row Selection
  • [x] Row Expanding
  • [x] Pagination
  • [x] Styles Api
  • [x] Component Overrides
  • [x] Docs
  • [x] Create npm package
  • [ ] Add tests

Extension points exported contracts — how you extend this code

ColumnSorterProps (Interface)
(no doc)
src/ColumnSorter.tsx
ColumnFilterProps (Interface)
(no doc)
src/ColumnFilter.tsx
DataGridProps (Interface)
(no doc)
src/types.ts
ExternalColumnFilterProps (Interface)
(no doc)
src/ColumnFilter.tsx

Core symbols most depended-on inside this repo

update
called by 23
docs/pages/Demo.tsx
ex
called by 19
docs/pages/examples/index.ts
format
called by 12
src/filters/stringFilter.tsx
getLeftValue
called by 10
src/filters/numberFilter.tsx
getLeftValue
called by 7
src/filters/dateFilter.tsx
createDateFilterInput
called by 7
src/filters/dateFilter.tsx
handleChange
called by 6
src/ColumnFilter.tsx
createOperatorFilter
called by 6
src/filters/createOperatorFilter.tsx

Shape

Function 105
Interface 4
Class 2
Method 1

Languages

TypeScript100%

Modules by API surface

src/ColumnFilter.tsx9 symbols
src/filters/dateFilter.tsx8 symbols
src/filters/numberFilter.tsx6 symbols
src/TableComponents.tsx6 symbols
docs/pages/Demo.tsx6 symbols
src/filters/booleanFilter.tsx4 symbols
docs/pages/examples/AsyncExample.tsx4 symbols
docs/components/PropertyTable.tsx4 symbols
src/filters/stringFilter.tsx3 symbols
src/filters/createOperatorFilter.tsx3 symbols
src/Pagination.tsx3 symbols
src/DataGrid.tsx3 symbols

For agents

$ claude mcp add mantine-data-grid \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page