Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gregnb/mui-datatables
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.8.3
Choose a base ref
...
head repository: gregnb/mui-datatables
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3
Choose a head ref
  • 8 commits
  • 4 files changed
  • 3 contributors

Commits on Feb 20, 2022

  1. fix : Changed to work only in browser(storageKey)

    - for nextJS
    
    (cherry picked from commit e2098fc)
    wdh2100 committed Feb 20, 2022
    Copy the full SHA
    2912787 View commit details
  2. document : fix README.md

    wdh2100 committed Feb 20, 2022
    Copy the full SHA
    be4ee8d View commit details
  3. Release 3.8.4

    wdh2100 committed Feb 20, 2022
    Copy the full SHA
    d266ef0 View commit details

Commits on Feb 23, 2022

  1. Remove console.logs

    busches authored Feb 23, 2022
    Copy the full SHA
    9fb2af1 View commit details
  2. Merge pull request #1875 from busches/patch-3

    v3 - Remove console.logs
    wdh2100 authored Feb 23, 2022
    Copy the full SHA
    6b3d44a View commit details

Commits on Mar 15, 2022

  1. Release 3.8.5

    wdh2100 committed Mar 15, 2022
    Copy the full SHA
    2f3fa10 View commit details

Commits on May 30, 2022

  1. Copy the full SHA
    af67b15 View commit details

Commits on Aug 5, 2022

  1. Merge pull request #1926 from vbruzzi/vbruzzi/isEmpty_error

    Fixed an issue where empty cells would throw an error
    wdh2100 authored Aug 5, 2022
    Copy the full SHA
    e94d15b View commit details
Showing with 14 additions and 6 deletions.
  1. +1 −1 README.md
  2. +1 −1 package.json
  3. +2 −3 src/components/TableBodyCell.js
  4. +10 −1 src/localStorage/load.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -246,7 +246,7 @@ The component accepts the following props:
|**`tableBodyMaxHeight`**|string||CSS string for the height of the table (ex: '500px', '100%', 'auto').
|**`textLabels`**|object||User provided labels to localize text.
|**`viewColumns`**|boolean or string|true|Show/hide viewColumns icon from toolbar. Possible values:<p><ul><li>true: Button is visiable and clickable.</li><li>false: Button is not visible.</li><li>disabled: Button is visible, but not clickable.</li></ul></p>
|**`storageKey`**|string|| ave current state to local storage.
|**`storageKey`**|string|| ave current state to local storage.(Only browser)

## Customize Columns

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mui-datatables",
"version": "3.8.3",
"version": "3.8.5",
"description": "Datatables for React using Material-UI",
"main": "dist/index.js",
"files": [
5 changes: 2 additions & 3 deletions src/components/TableBodyCell.js
Original file line number Diff line number Diff line change
@@ -105,9 +105,9 @@ function TableBodyCell(props) {
className,
print,
tableId,
isEmpty,
...otherProps
} = props;
console.log(props);
const onCellClick = options.onCellClick;

const handleClick = useCallback(
@@ -170,12 +170,11 @@ function TableBodyCell(props) {
{typeof children === 'function' ? children(dataIndex, rowIndex) : children}
</div>,
];
console.log('isEmty' + props.isEmpty);
var innerCells;
if (
['standard', 'scrollMaxHeight', 'scrollFullHeight', 'scrollFullHeightFullWidth'].indexOf(options.responsive) !==
-1 ||
props.isEmpty
isEmpty
) {
innerCells = cells.slice(1, 2);
} else {
11 changes: 10 additions & 1 deletion src/localStorage/load.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
export const load = storageKey => JSON.parse(window.localStorage.getItem(storageKey));
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';

export const load = storageKey => {
if (isBrowser) {
return JSON.parse(window.localStorage.getItem(storageKey));
} else if (storageKey !== undefined) {
console.warn('storageKey support only on browser');
return undefined;
}
};