mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-03 23:42:50 +00:00
Merge pull request #8832 from PublicParadise/rn-scrollto
Adding scrollTo to react-native's ScrollViewStatic
This commit is contained in:
commit
d3cc2116cf
16
react-native/react-native.d.ts
vendored
16
react-native/react-native.d.ts
vendored
@ -2768,7 +2768,21 @@ declare namespace __React {
|
||||
}
|
||||
|
||||
interface ScrollViewStatic extends React.ComponentClass<ScrollViewProps> {
|
||||
|
||||
/**
|
||||
* Scrolls to a given x, y offset, either immediately or with a smooth animation.
|
||||
* Syntax:
|
||||
*
|
||||
* scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})
|
||||
*
|
||||
* Note: The weird argument signature is due to the fact that, for historical reasons,
|
||||
* the function also accepts separate arguments as as alternative to the options object.
|
||||
* This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
|
||||
*/
|
||||
scrollTo(
|
||||
y?: number | { x?: number, y?: number, animated?: boolean },
|
||||
x?: number,
|
||||
animated?: boolean
|
||||
): void;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user