Minimal Example
Material React Table gives you a lot out of the box, but it's also easy to turn off any features that you don't need.
Every feature has an enable...
prop that let's you turn it on or off.
For example, you can turn off sorting or hide the top or bottom toolbars if you want.
First Name | Last Name | Address | City | State |
---|---|---|---|---|
Dylan | Murray | 261 Erdman Ford | East Daphne | Kentucky |
Raquel | Kohler | 769 Dominic Grove | Columbus | Ohio |
Ervin | Reinger | 566 Brakus Inlet | South Linda | West Virginia |
Brittany | McCullough | 722 Emie Stream | Lincoln | Nebraska |
Branson | Frami | 32188 Larkin Turnpike | Charleston | South Carolina |
1import React, { FC, useMemo } from 'react';2import MaterialReactTable, { MRT_ColumnDef } from 'material-react-table';3import { data, Person } from './makeData';45export const Example: FC = () => {6 const columns = useMemo<MRT_ColumnDef<Person>[]>(7 //column definitions...32 );3334 return (35 <MaterialReactTable36 columns={columns}37 data={data}38 enableColumnActions={false}39 enableColumnFilters={false}40 enablePagination={false}41 enableSorting={false}42 enableBottomToolbar={false}43 enableTopToolbar={false}44 muiTableBodyRowProps={{ hover: false }}45 />46 );47};4849export default Example;50
View Extra Storybook Examples