Searched refs:targetPosition (Results 1 – 1 of 1) sorted by relevance
21 const targetPosition = target.offsetTop; constant25 if (targetPosition < position + upperThreshold) {26 ref.current.scrollTo({ top: Math.max(0, targetPosition - upperThreshold) });27 } else if (targetPosition > position + lowerThreshold) {28 ref.current.scrollTo({ top: targetPosition - lowerThreshold });