Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mui-tables

parkerself2268MIT2.0.4TypeScript support: included

Pluggable table library built on top of Material-UI components

react, reactjs, mui-table, mui-tables, material-ui, mui

readme

Overview | MUI Tables

Travis \(.org\) npm codecov npm

DOCUMENTATION SITE

MUI Tables is a highly-pluggable table library built on top of the fantastic Material-UI component library.

While multiple libraries already provide many of the features included, few (in my opinion) provide as much abstraction on top of the data management aspect of building and using tables. The goal for MUI Tables is to make data management as painless as possible while providing as many customization options as possible.

Play with the Configurable Demo here!

Example with Summary, Date Toolbar, Filters,

Installation

npm i --save mui-tables

Peer Dependencies:

{
    "@material-ui/core": ">= 3.9.0",
    "@material-ui/icons": ">= 3.0.0",
    "react": ">= 16.8.1"
}

Features

Feature Description
Custom Components Multiple options to hook into component rendering, all supplied with the full context of the table
Event Hooks Hook into specific table events such as search and filter changes, row selection, and more
Summary Row No config required summary row with two formats, more on the way.
Automatic Duplicate Handling Specify whether duplicate rows should be displayed, merged, or hidden.
Built In Date Toolbar No custom toolbar required, just specify change handlers and date values.
Localization Full control over almost every text label.
Typescript Support Typings included. Never guess what data you're hooks will be passed.
Styling Override styles using MUIThemeProvider.

Example Usage

Intro Example

import React from 'react';
import MUITable from 'mui-tables';

const data = [
    { name: 'Bob', demographics: { age: 29, gender: "male" } },
    { name: 'Alice', demographics: { age: 34, gender: "female" } }
];

const columns = {
    static: [
        {
            name: 'name',
            title: 'Name',
            calculateCellDefinition: (entry) => ({
                display: entry.name,
                value: entry.name
            })
        },
        {
            name: 'age',
            title: 'Age',
            calculateCellDefinition: (entry) => ({
                // Never ask a woman's age fool!
                display: entry.demographics.gender === "female" ? "❓" : entry.demographics.age,
                value: entry.demographics.age
            })
        }
    ]
};

export const IntroExample = () => (
    <MUITable data={data} title={'Intro Table'} columns={columns} loading={false} />
);

Props / Options

See Here

Built With

Contributing

Coming soon...

Versioning

We use SemVer for versioning. For the versions available, see the releases on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

changelog

2.0.4 (2019-03-08)

Bug Fixes

  • Styles: Fixed an issue with the no data row and made sure all components have style keys for ov (9567f3c)

2.0.3 (2019-03-05)

Bug Fixes

  • customToolbarBottom option: Fix an issue with styling (e4e7074)

2.0.2 (2019-02-28)

Bug Fixes

  • ColumnFilters: The removal of filter: false columns threw off column filter indexes (3909773)

2.0.1 (2019-02-28)

Bug Fixes

  • Fixed header and column options: The fixed header was only rendering at 25% of toolbar when sho (bdab0a9)

2.0.0 (2019-02-22)

Bug Fixes

  • MUITableToolbarSelect && Options: Renamed a few of the options for clarity. Fixed the fact that (5a4681f)

BREAKING CHANGES

  • MUITableToolbarSelect && Options: Renamed hiddenColumnsMergeDuplicates row option to hiddenColumnMerge. Added context as an argument to customToolbarSelect function.

1.1.0 (2019-02-22)

Features

  • fixedSearch in header, more custom toolbar options, tests: Added an ever-present searchbar options for the header. Added more custom toolbar hooks. + test coverage for all. (06802bc)

1.0.12 (2019-02-20)

Bug Fixes

  • hooks, mergeRows, test coverage: Fixed support for firing all hooks. Added row duplicate filtering and merging options to row props. Increased test coverage up to 100% (5d19848)

1.0.11 (2019-02-15)

Bug Fixes

  • add LICENSE: add license (7348b2a)
  • documentation: add better documentation (e5c7fa8)
  • license + package.json: fix typo, update docs (255cf1a)
  • release config: turns out renaming the repo wasn't the best call (4ec74f9)

1.0.10 (2019-02-15)

Bug Fixes

  • testing dependencies: Ignore devDependencies because last push passed due to module in dev when it should have been in deps. (cb30a4d)

1.0.9 (2019-02-15)

Bug Fixes

  • testing dependencies: add a dependency check test using depcheck (cc84cda)

1.0.8 (2019-02-14)

Bug Fixes

  • exports & ts-config: mistakenly had jsx: "preserve" when it should be compiled for the package (9d0fda5)

1.0.7 (2019-02-14)

Bug Fixes

  • changelog: update changelog (0a4d749)
  • exports & config: did not have typings generated for dist (5587ede)

1.0.6 (2019-02-14)

Bug Fixes

  • release config: this should make sure the package repo is updated (ecaa249)

1.0.5 (2019-02-14)

Bug Fixes

  • style config: fix prettier and ts-lint configs (8ebeecc)
  • ts-lint: fix prettier and ts-lint configs (e065980)
  • ts-lint: fix ts-lint config (bce4da3)
  • ts-lint: fix ts-lint config and make sure deps are setup after removing lodash (89b28de)

1.0.4 (2019-02-14)

Bug Fixes

  • ts-lint: tslint config was throwing errors (65057f1)

1.0.3 (2019-02-14)

Bug Fixes

  • default export, tests, stories: lots of tests in here, the big change though is the default export is fixed... probably should have checked that before publish... (c45fa81)
  • test utils: needed to call afterAll(sandbox.restore) for anywhere sinon was stubbing out functions. Caused an error in CI that was not thrown when running each test file individually. (4e2874a)
  • tests: more test coverage (914af7d)

1.0.2 (2019-02-11)

Bug Fixes

1.0.1 (2019-02-11)

Bug Fixes

  • .gitignore: hopefully everything should run right now (7b205cd)
  • codecov: fix the coverage config (da18c20)