Skip to content

Commit

Permalink
release v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Oct 31, 2023
1 parent 0db8129 commit 97fe2da
Show file tree
Hide file tree
Showing 9 changed files with 387 additions and 247 deletions.
16 changes: 8 additions & 8 deletions apps/material-react-table-docs/package.json
Expand Up @@ -22,32 +22,32 @@
"@fortawesome/react-fontawesome": "^0.2.0",
"@mdx-js/loader": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"@mui/icons-material": "^5.14.15",
"@mui/material": "^5.14.15",
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.16",
"@mui/x-date-pickers": "^6.17.0",
"@next/mdx": "^14.0.0",
"@next/mdx": "^14.0.1",
"@tanstack/react-query": "^5.4.3",
"@types/mdx": "^2.0.9",
"dayjs": "^1.11.10",
"export-to-csv": "^1.2.1",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.7.0",
"material-react-table": "workspace:*",
"next": "14.0.0",
"next": "14.0.1",
"next-sitemap": "^4.2.3",
"prism-react-renderer": "^2.1.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^5.0.5",
"@types/node": "^20.8.9",
"@types/node": "^20.8.10",
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"eslint": "8.52.0",
"eslint-config-next": "14.0.0",
"eslint-config-next": "14.0.1",
"next-plausible": "^3.11.3",
"raw-loader": "^4.0.2",
"typescript": "5.2.2"
Expand Down
6 changes: 6 additions & 0 deletions apps/material-react-table-docs/pages/changelog.mdx
Expand Up @@ -12,6 +12,12 @@ import Head from 'next/head';

### Version 2

#### Version 2.0.1 - 10-31-2023

- Fixed bug where edit row action menu was created for all editDisplayModes
- Fixed rest spread on table head row
- Changed pagination text to a span instead of with hardcoded 0 margin and padding

#### Version 2.0.0 - 10-27-2023

- Made `MaterialReactTable` a named export instead of a default export.
Expand Down
4 changes: 2 additions & 2 deletions apps/test-cra/package.json
Expand Up @@ -5,8 +5,8 @@
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.15",
"@mui/material": "^5.14.15",
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.16",
"@mui/x-date-pickers": "^6.17.0",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/test-remix/package.json
Expand Up @@ -12,8 +12,8 @@
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.15",
"@mui/material": "^5.14.15",
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.16",
"@mui/x-date-pickers": "^6.17.0",
"@remix-run/css-bundle": "^2.1.0",
"@remix-run/node": "^2.1.0",
Expand Down
8 changes: 4 additions & 4 deletions apps/test-vite/package.json
Expand Up @@ -12,8 +12,8 @@
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.15",
"@mui/material": "^5.14.15",
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.16",
"@mui/x-date-pickers": "^6.17.0",
"material-react-table": "workspace:*",
"react": "^18.2.0",
Expand All @@ -22,8 +22,8 @@
"devDependencies": {
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@vitejs/plugin-react": "^4.1.0",
"eslint": "^8.52.0",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/material-react-table/package.json
@@ -1,5 +1,5 @@
{
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",
"name": "material-react-table",
"description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
Expand Down Expand Up @@ -66,8 +66,8 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@faker-js/faker": "^8.2.0",
"@mui/icons-material": "^5.14.15",
"@mui/material": "^5.14.15",
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.16",
"@mui/x-date-pickers": "^6.17.0",
"@rollup/plugin-typescript": "^11.1.5",
"@size-limit/preset-small-lib": "^10.0.1",
Expand All @@ -80,11 +80,11 @@
"@storybook/react": "^7.5.2",
"@storybook/react-vite": "^7.5.2",
"@storybook/testing-library": "^0.2.2",
"@types/node": "^20.8.9",
"@types/node": "^20.8.10",
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@vitejs/plugin-react": "^4.1.0",
"eslint": "^8.52.0",
"eslint-plugin-mui-path-imports": "^0.0.15",
Expand Down
22 changes: 12 additions & 10 deletions packages/material-react-table/src/menus/MRT_RowActionMenu.tsx
Expand Up @@ -33,6 +33,7 @@ export const MRT_RowActionMenu = <TData extends MRT_RowData>({
const {
getState,
options: {
editDisplayMode,
enableEditing,
icons: { EditIcon },
localization,
Expand All @@ -52,16 +53,17 @@ export const MRT_RowActionMenu = <TData extends MRT_RowData>({
open={!!anchorEl}
{...rest}
>
{parseFromValuesOrFunc(enableEditing, row) && (
<MenuItem onClick={handleEdit} sx={commonMenuItemStyles}>
<Box sx={commonListItemStyles}>
<ListItemIcon>
<EditIcon />
</ListItemIcon>
{localization.edit}
</Box>
</MenuItem>
)}
{parseFromValuesOrFunc(enableEditing, row) &&
['modal', 'row'].includes(editDisplayMode!) && (
<MenuItem onClick={handleEdit} sx={commonMenuItemStyles}>
<Box sx={commonListItemStyles}>
<ListItemIcon>
<EditIcon />
</ListItemIcon>
{localization.edit}
</Box>
</MenuItem>
)}
{renderRowActionMenuItems?.({
closeMenu: () => setAnchorEl(null),
row,
Expand Down
Expand Up @@ -125,6 +125,45 @@ export const RowActionsAndEditingEnabled = () => (
/>
);

export const RowActionsAndEditingCellEnabled = () => (
<MaterialReactTable
columns={columns}
data={data}
editDisplayMode="cell"
enableEditing
enableRowActions
renderRowActionMenuItems={({ closeMenu, row }) => [
<MenuItem
key={1}
onClick={() => {
console.info('View Profile', row);
closeMenu();
}}
>
<AccountCircleIcon /> View Profile
</MenuItem>,
<MenuItem
key={2}
onClick={() => {
console.info('Remove', row);
closeMenu();
}}
>
<DeleteIcon /> Remove
</MenuItem>,
<MenuItem
key={3}
onClick={() => {
console.info('Share', row);
closeMenu();
}}
>
<ShareIcon /> Share
</MenuItem>,
]}
/>
);

export const RowActionsLastColumn = () => (
<MaterialReactTable
columns={columns}
Expand Down

2 comments on commit 97fe2da

@vercel
Copy link

@vercel vercel bot commented on 97fe2da Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 97fe2da Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.