fix(SW-2463): scroll to payment error

This commit is contained in:
Christian Andolf
2025-04-30 10:52:53 +02:00
committed by Michael Zetterberg
parent 8b32abbefc
commit 0cd2e9c89f
3 changed files with 31 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ let resizeObserver: ResizeObserver | null = null
* This hook registers an element as sticky, calculates its top offset based on
* other registered sticky elements, and updates the element's position dynamically.
*
* @param {UseStickyPositionProps} props - The properties for configuring the hook.
* @param {UseStickyPositionProps} [props] - The properties for configuring the hook.
* @param {React.RefObject<HTMLElement>} [props.ref] - A reference to the HTML element that should be sticky. Is optional to allow for other components to only get the height of the sticky elements.
* @param {StickyElementNameEnum} [props.name] - A unique name for the sticky element, used for tracking.
* @param {string} [props.group] - An optional group identifier to make multiple elements share the same top offset. Defaults to the name if not provided.
@@ -37,7 +37,7 @@ export default function useStickyPosition({
ref,
name,
group,
}: UseStickyPositionProps) {
}: UseStickyPositionProps = {}) {
const {
registerSticky,
unregisterSticky,