Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions types/react-native/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3736,6 +3736,14 @@ export interface SectionListData<ItemT> extends SectionBase<ItemT> {
[key: string]: any;
}

export interface SectionListScrollParams {
animated?: boolean;
itemIndex: number;
sectionIndex: number;
viewOffset?: number;
viewPosition?: number;
}

export interface SectionListProperties<ItemT> extends ScrollViewProperties {
/**
* Rendered in between adjacent Items within each section.
Expand Down Expand Up @@ -3844,6 +3852,13 @@ export interface SectionListProperties<ItemT> extends ScrollViewProperties {
* Only enabled by default on iOS because that is the platform standard there.
*/
stickySectionHeadersEnabled?: boolean;

/**
* Scrolls to the item at the specified sectionIndex and itemIndex (within the section)
* positioned in the viewable area such that viewPosition 0 places it at the top
* (and may be covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle.
*/
scrollToLocation?(params: SectionListScrollParams): void;
}

export interface SectionListStatic<SectionT> extends React.ComponentClass<SectionListProperties<SectionT>> {}
Expand Down