Skip to content

Replace fast-deep-equal with deep-eql #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"classnames": "^2.2.6",
"date-fns": "^2.16.1",
"debounce": "^1.2.0",
"fast-deep-equal": "^3.1.3",
"deep-eql": "^4.1.1",
"prop-types": "^15.7.2",
"react-double-scrollbar": "0.0.15",
"uuid": "^3.4.0"
Expand Down
10 changes: 5 additions & 5 deletions src/material-table.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { debounce } from 'debounce';
import equal from 'fast-deep-equal/react';
import deepEql from 'deep-eql';
import {
Table,
TableFooter,
Expand Down Expand Up @@ -218,11 +218,11 @@ export default class MaterialTable extends React.Component {
const fixedPrevColumns = this.cleanColumns(prevProps.columns);
const fixedPropsColumns = this.cleanColumns(this.props.columns);

const columnPropsChanged = !equal(fixedPrevColumns, fixedPropsColumns);
const columnPropsChanged = !deepEql(fixedPrevColumns, fixedPropsColumns);
let propsChanged =
columnPropsChanged || !equal(prevProps.options, this.props.options);
columnPropsChanged || !deepEql(prevProps.options, this.props.options);
if (!this.isRemoteData()) {
propsChanged = propsChanged || !equal(prevProps.data, this.props.data);
propsChanged = propsChanged || !deepEql(prevProps.data, this.props.data);
}

if (propsChanged) {
Expand Down Expand Up @@ -252,7 +252,7 @@ export default class MaterialTable extends React.Component {
const prevColumnsWithoutFunctions = functionlessColumns(
fixedPrevColumns
);
const columnsEqual = equal(
const columnsEqual = deepEql(
currentColumnsWithoutFunctions,
prevColumnsWithoutFunctions
);
Expand Down