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: TanStack/virtual
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: wcpos/react-virtual
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Nov 14, 2021

  1. test for react-native

    kilbot committed Nov 14, 2021
    Copy the full SHA
    ec6e7ee View commit details
Showing with 5 additions and 5 deletions.
  1. +1 −1 docs/src/components/blog/intersection-observer/utils.js
  2. +2 −2 docs/src/components/useOverScroll.js
  3. +1 −1 docs/src/components/useTocHighlight.js
  4. +1 −1 src/useRect.js
2 changes: 1 addition & 1 deletion docs/src/components/blog/intersection-observer/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function isDOMNode(node) {
return (
node && Object.prototype.hasOwnProperty.call(node, 'getBoundingClientRect')
node && Object.prototype.hasOwnProperty.call(node, 'measure')
)
}

4 changes: 2 additions & 2 deletions docs/src/components/useOverScroll.js
Original file line number Diff line number Diff line change
@@ -30,12 +30,12 @@ export const useOverScroll = () => {
const y = useTransform(scrollY, [rect.bottom - height, rect.top + 300], [0, -rectInner.height + rect.height]);
React.useEffect(() => {
if (ref.current) {
setRect(ref.current.getBoundingClientRect());
setRect(ref.current.measure());
}
}, [setRect, ref]);
React.useEffect(() => {
if (refInner.current) {
setRectInner(refInner.current.getBoundingClientRect());
setRectInner(refInner.current.measure());
}
}, [setRectInner, refInner]);
return {
2 changes: 1 addition & 1 deletion docs/src/components/useTocHighlight.js
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ export function useTocHighlight(linkClassName, linkActiveClassName, topOffset, g
const headerAnchor = headersAnchors[index];
const {
top
} = headerAnchor.getBoundingClientRect();
} = headerAnchor.measure();

if (top >= 0 && top <= topOffset) {
activeHeaderAnchor = headerAnchor;
2 changes: 1 addition & 1 deletion src/useRect.js
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ export default function useRect(nodeRef) {
useIsomorphicLayoutEffect(() => {
if (element && !initialRectSet.current) {
initialRectSet.current = true
const rect = element.getBoundingClientRect();
const rect = element.measure();
dispatch({ rect });
}
}, [element])