techniq / mui-table

Improved Material-UI table
https://techniq.github.io/mui-table/
MIT License
45 stars 12 forks source link

Version 2.0.0 #13

Closed techniq closed 6 years ago

techniq commented 6 years ago

Decided with version 2.0.0 to drop the react-virtualized requirement and use standard table elements (display: table) by default. This provides the additional benefits:

Benefits

Breaking changes

While I attempted to keep the same API/props as much as possible, I did make some changes (mostly due to the differences implementations, although I took the opportunity with the change to update some pain points of 1.0.0.

<MuiTable onCellClick=(column, rowData) => {...} />

now becomes

<MuiTable onCellClick=({ rowData }) => {...} />

when you only need to use rowData. This is even cleaner for isCellHovered when using for row hovering.

<MuiTable
  isCellHovered={(column, rowData, hoveredColumn, hoveredRowData) => {
    return rowData.id && rowData.id === hoveredRowData.id
  }}
/>

now becomes

<MuiTable
  isCellHovered={({ rowData, hoveredRowData }) => {
    return rowData.id && rowData.id === hoveredRowData.id
  }}
/>

Regressions / future work

Notes

<Table style={{ tableLayout: 'fixed' }} />
techniq commented 6 years ago

Released to npm

cvanem commented 6 years ago

@techniq Looks good. I didn't realize this does not have support for virtual scrolling yet, so I am going to have to remain using mui-virtualized-table for now. I do like the column resizing, reduced props and performance benefits of this implementation.