forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Merge PR DefinitelyTyped#46383 [react-select] Fix animatedScrollTo …
…method by @Methuselah96 * Fix animatedScrollTo method * Add test * Add change * Add file * Fix
- Loading branch information
1 parent
ee8e095
commit ed8bf83
Showing
3 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { animatedScrollTo } from "react-select/src/utils"; | ||
|
||
// Inspired by https://github.com/JedWatson/react-select/blob/master/docs/App/PageNav.js#L70 | ||
const el = document.querySelector<HTMLElement>('#test'); | ||
if (el && el.offsetTop) { | ||
animatedScrollTo(window, el.offsetTop); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters