diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 2b59454222..4b06119df2 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -4111,6 +4111,11 @@ export class FlatList extends React.Component> { * by taps on items or by navigation actions. */ recordInteraction: () => void; + + /** + * Displays the scroll indicators momentarily. + */ + flashScrollIndicators: () => void; } /** diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 1fcbe153e6..801565dc8d 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -332,6 +332,14 @@ InteractionManager.runAfterInteractions(() => { }).then(() => "done"); export class FlatListTest extends React.Component, {}> { + list: FlatList | null = null; + + componentDidMount(): void { + if (this.list) { + this.list.flashScrollIndicators(); + } + } + _renderItem = (rowData: any) => { return ( @@ -345,6 +353,7 @@ export class FlatListTest extends React.Component, {}> { render() { return ( (this.list = list)} data={[1, 2, 3, 4, 5]} renderItem={this._renderItem} ItemSeparatorComponent={this._renderSeparator}