svelte-ux
Version:
- Increment version in `package.json` and commit as `Version bump to x.y.z` - `npm run publish`
11 lines (10 loc) • 493 B
TypeScript
/**
* Find the closest scrollable parent
* - see: https://stackoverflow.com/questions/35939886/find-first-scrollable-parent
* - see: https://gist.github.com/twxia/bb20843c495a49644be6ea3804c0d775
*/
export declare function getScrollParent(node: any): HTMLElement | null;
/**
* Scroll node into view of closely scrollable (overflown) parent. Like `node.scrollIntoView()` but will only scroll immediate container (not viewport)
*/
export declare function scrollIntoView(node: any): void;