Skip to content

Commit

Permalink
use Array.some + bump dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mckervinc committed Dec 16, 2024
1 parent 5d2ccd7 commit d6d12a4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-fluid-table",
"version": "1.1.0",
"version": "1.1.1",
"description": "A React table inspired by @tanstack/react-virtual",
"author": "Mckervin Ceme <mckervinc@live.com>",
"license": "MIT",
Expand Down Expand Up @@ -93,7 +93,7 @@
},
"dependencies": {
"@tanstack/react-virtual": "^3.11.1",
"react-resize-detector": "^11.0.1"
"react-resize-detector": "^12.0.1"
},
"volta": {
"node": "18.18.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const Table = forwardRef(function <T>(
maxTableHeight={maxHeight}
headerHeight={headerHeight}
footerHeight={footerHeight}
hasFooter={!!footerComponent || !!columns.find(c => !!c.footer)}
hasFooter={!!footerComponent || columns.some(c => !!c.footer)}
>
{({ height, width }) => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Footer<T>({
const ref = useRef<HTMLDivElement>(null);

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

// render
if (!Component) {
const hasFooter = !!columns.find(c => !!c.footer);
const hasFooter = columns.some(c => !!c.footer);
return (
<div
ref={ref}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4004,10 +4004,10 @@ react-is@^16.13.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

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

Expand Down

0 comments on commit d6d12a4

Please sign in to comment.