Skip to content

Commit

Permalink
fix(17041): use react-fast-compare to compare props update in DataTab…
Browse files Browse the repository at this point in the history
…le (carbon-design-system#17056)

* fix(17041): use react-fast-compare to compare props update in DataTable

* fix(yarn): add yarn cache
  • Loading branch information
yaoterry committed Jul 29, 2024
1 parent f2a1eb2 commit 930d97b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Binary file not shown.
1 change: 1 addition & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"lodash.omit": "^4.5.0",
"lodash.throttle": "^4.1.1",
"prop-types": "^15.7.2",
"react-fast-compare": "^3.2.2",
"react-is": "^18.2.0",
"tabbable": "^6.2.0",
"use-resize-observer": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import PropTypes from 'prop-types';
import React from 'react';
import isEqual from 'lodash.isequal';
import isEqual from 'react-fast-compare';
import getDerivedStateFromProps from './state/getDerivedStateFromProps';
import { getNextSortState } from './state/sorting';
import type { DataTableSortState } from './state/sortStates';
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2079,6 +2079,7 @@ __metadata:
prop-types: "npm:^15.7.2"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
react-fast-compare: "npm:^3.2.2"
react-is: "npm:^18.2.0"
remark-gfm: "npm:^3.0.1"
requestanimationframe: "npm:^0.0.23"
Expand Down Expand Up @@ -23208,6 +23209,13 @@ __metadata:
languageName: node
linkType: hard

"react-fast-compare@npm:^3.2.2":
version: 3.2.2
resolution: "react-fast-compare@npm:3.2.2"
checksum: 10/a6826180ba75cefba1c8d3ac539735f9b627ca05d3d307fe155487f5d0228d376dac6c9708d04a283a7b9f9aee599b637446635b79c8c8753d0b4eece56c125c
languageName: node
linkType: hard

"react-inspector@npm:^6.0.0":
version: 6.0.1
resolution: "react-inspector@npm:6.0.1"
Expand Down

0 comments on commit 930d97b

Please sign in to comment.