Skip to content

Commit d6d12a4

Browse files
committed
use Array.some + bump dependency
1 parent 5d2ccd7 commit d6d12a4

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-fluid-table",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "A React table inspired by @tanstack/react-virtual",
55
"author": "Mckervin Ceme <mckervinc@live.com>",
66
"license": "MIT",
@@ -93,7 +93,7 @@
9393
},
9494
"dependencies": {
9595
"@tanstack/react-virtual": "^3.11.1",
96-
"react-resize-detector": "^11.0.1"
96+
"react-resize-detector": "^12.0.1"
9797
},
9898
"volta": {
9999
"node": "18.18.0",

src/Table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const Table = forwardRef(function <T>(
6767
maxTableHeight={maxHeight}
6868
headerHeight={headerHeight}
6969
footerHeight={footerHeight}
70-
hasFooter={!!footerComponent || !!columns.find(c => !!c.footer)}
70+
hasFooter={!!footerComponent || columns.some(c => !!c.footer)}
7171
>
7272
{({ height, width }) => {
7373
return (

src/components/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function Footer<T>({
5353
const ref = useRef<HTMLDivElement>(null);
5454

5555
// constants
56-
const hasFooter = !!Component || !!columns.find(c => !!c.footer);
56+
const hasFooter = !!Component || columns.some(c => !!c.footer);
5757
const style: React.CSSProperties = {
5858
minWidth: sticky ? undefined : pixelWidths.reduce((pv, c) => pv + c, 0),
5959
...footerStyle
@@ -109,7 +109,7 @@ function Footer<T>({
109109

110110
// render
111111
if (!Component) {
112-
const hasFooter = !!columns.find(c => !!c.footer);
112+
const hasFooter = columns.some(c => !!c.footer);
113113
return (
114114
<div
115115
ref={ref}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4004,10 +4004,10 @@ react-is@^16.13.1:
40044004
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
40054005
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
40064006

4007-
react-resize-detector@^11.0.1:
4008-
version "11.0.1"
4009-
resolved "https://registry.yarnpkg.com/react-resize-detector/-/react-resize-detector-11.0.1.tgz#70684958ae82bc0deb240d133a1ee440e0624532"
4010-
integrity sha512-1Tdgu6Ou3vI3RQD+o2/kTvDibb4NRe7Oh83hIjNNEXb6WKKCQT99VQlh3Xlbdq2HtkUoFEMrgMMKkYI83YbD7Q==
4007+
react-resize-detector@^12.0.1:
4008+
version "12.0.1"
4009+
resolved "https://registry.yarnpkg.com/react-resize-detector/-/react-resize-detector-12.0.1.tgz#7d7eba49a538c32ba45f121b6dc9f28bf1dc4077"
4010+
integrity sha512-qOzOEn8AC4i60L29sPeUtw3RRsdDYZAGOBDwg3vzUQ34fpP+JOBlf1x0Q8Wv85IPQ3nBNL4NNr12e2caiIK1Lg==
40114011
dependencies:
40124012
lodash "^4.17.21"
40134013

0 commit comments

Comments
 (0)