@legendapp/list 2.1.0-next.1 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +81 -0
- package/animated.d.mts +2 -2
- package/animated.d.ts +2 -2
- package/index.d.mts +8 -611
- package/index.d.ts +8 -611
- package/index.js +1537 -1048
- package/index.mjs +1488 -999
- package/index.native.d.mts +23 -0
- package/index.native.d.ts +23 -0
- package/index.native.js +3545 -0
- package/index.native.mjs +3517 -0
- package/package.json +11 -3
- package/reanimated.d.mts +5 -4
- package/reanimated.d.ts +5 -4
- package/reanimated.js +24 -6
- package/reanimated.mjs +2 -1
- package/section-list.d.mts +113 -0
- package/section-list.d.ts +113 -0
- package/section-list.js +3924 -0
- package/section-list.mjs +3903 -0
- package/section-list.native.d.mts +113 -0
- package/section-list.native.d.ts +113 -0
- package/section-list.native.js +3703 -0
- package/section-list.native.mjs +3682 -0
- package/types-JPHClxiw.d.mts +670 -0
- package/types-JPHClxiw.d.ts +670 -0
- package/types-YNdphn_A.d.mts +670 -0
- package/types-YNdphn_A.d.ts +670 -0
package/package.json
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/list",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
4
4
|
"description": "Legend List is a drop-in replacement for FlatList with much better performance and supporting dynamically sized items.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"private": false,
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"module": "./index.mjs",
|
|
9
9
|
"types": "./index.d.ts",
|
|
10
|
+
"react-native": "./index.native.js",
|
|
10
11
|
"files": [
|
|
11
12
|
"**"
|
|
12
13
|
],
|
|
13
14
|
"peerDependencies": {
|
|
14
|
-
"react": "*"
|
|
15
|
-
|
|
15
|
+
"react": "*"
|
|
16
|
+
},
|
|
17
|
+
"peerDependenciesMeta": {
|
|
18
|
+
"react-dom": {
|
|
19
|
+
"optional": true
|
|
20
|
+
},
|
|
21
|
+
"react-native": {
|
|
22
|
+
"optional": true
|
|
23
|
+
}
|
|
16
24
|
},
|
|
17
25
|
"author": "Legend <contact@legendapp.com> (https://github.com/LegendApp)",
|
|
18
26
|
"keywords": [
|
package/reanimated.d.mts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
2
3
|
import Animated from 'react-native-reanimated';
|
|
3
4
|
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
4
5
|
|
|
5
6
|
type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
|
|
6
7
|
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
|
7
8
|
interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
8
|
-
refScrollView?:
|
|
9
|
+
refScrollView?: React.Ref<Animated.ScrollView>;
|
|
9
10
|
}
|
|
10
11
|
type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
|
|
11
12
|
type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
|
|
12
13
|
type AnimatedLegendListDefinition = <ItemT>(props: AnimatedLegendListProps<ItemT> & {
|
|
13
|
-
ref?:
|
|
14
|
-
}) =>
|
|
14
|
+
ref?: React.Ref<LegendListRef>;
|
|
15
|
+
}) => React.ReactElement | null;
|
|
15
16
|
declare const AnimatedLegendList: AnimatedLegendListDefinition;
|
|
16
17
|
|
|
17
18
|
export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };
|
package/reanimated.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
2
3
|
import Animated from 'react-native-reanimated';
|
|
3
4
|
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
4
5
|
|
|
5
6
|
type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
|
|
6
7
|
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
|
7
8
|
interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
8
|
-
refScrollView?:
|
|
9
|
+
refScrollView?: React.Ref<Animated.ScrollView>;
|
|
9
10
|
}
|
|
10
11
|
type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
|
|
11
12
|
type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
|
|
12
13
|
type AnimatedLegendListDefinition = <ItemT>(props: AnimatedLegendListProps<ItemT> & {
|
|
13
|
-
ref?:
|
|
14
|
-
}) =>
|
|
14
|
+
ref?: React.Ref<LegendListRef>;
|
|
15
|
+
}) => React.ReactElement | null;
|
|
15
16
|
declare const AnimatedLegendList: AnimatedLegendListDefinition;
|
|
16
17
|
|
|
17
18
|
export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };
|
package/reanimated.js
CHANGED
|
@@ -6,7 +6,25 @@ var list = require('@legendapp/list');
|
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
10
28
|
var Animated__default = /*#__PURE__*/_interopDefault(Animated);
|
|
11
29
|
|
|
12
30
|
// src/integrations/reanimated.tsx
|
|
@@ -36,7 +54,7 @@ var useCombinedRef = (...refs) => {
|
|
|
36
54
|
// src/integrations/reanimated.tsx
|
|
37
55
|
var typedMemo = React.memo;
|
|
38
56
|
var LegendListForwardedRef = typedMemo(
|
|
39
|
-
|
|
57
|
+
React__namespace.forwardRef(function LegendListForwardedRef2(props, ref) {
|
|
40
58
|
const { refLegendList, ...rest } = props;
|
|
41
59
|
const refFn = React.useCallback(
|
|
42
60
|
(r) => {
|
|
@@ -44,16 +62,16 @@ var LegendListForwardedRef = typedMemo(
|
|
|
44
62
|
},
|
|
45
63
|
[refLegendList]
|
|
46
64
|
);
|
|
47
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ React__namespace.createElement(list.LegendList, { ref: refFn, refScrollView: ref, ...rest });
|
|
48
66
|
})
|
|
49
67
|
);
|
|
50
68
|
var AnimatedLegendListComponent = Animated__default.default.createAnimatedComponent(LegendListForwardedRef);
|
|
51
69
|
var AnimatedLegendList = typedMemo(
|
|
52
|
-
|
|
70
|
+
React__namespace.forwardRef(function AnimatedLegendList2(props, ref) {
|
|
53
71
|
const { refScrollView, ...rest } = props;
|
|
54
|
-
const refLegendList =
|
|
72
|
+
const refLegendList = React__namespace.useRef(null);
|
|
55
73
|
const combinedRef = useCombinedRef(refLegendList, ref);
|
|
56
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ React__namespace.createElement(AnimatedLegendListComponent, { ref: refScrollView, refLegendList: combinedRef, ...rest });
|
|
57
75
|
})
|
|
58
76
|
);
|
|
59
77
|
|
package/reanimated.mjs
CHANGED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as react_native from 'react-native';
|
|
2
|
+
import { SectionListData, SectionBase, SectionListRenderItemInfo, SectionListScrollParams } from 'react-native';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { a as LegendListRef, L as LegendListProps } from './types-JPHClxiw.mjs';
|
|
5
|
+
import 'react-native-reanimated';
|
|
6
|
+
|
|
7
|
+
type SectionListSeparatorProps<ItemT, SectionT> = {
|
|
8
|
+
leadingItem?: ItemT;
|
|
9
|
+
leadingSection?: SectionListData<ItemT, SectionT>;
|
|
10
|
+
section: SectionListData<ItemT, SectionT>;
|
|
11
|
+
trailingItem?: ItemT;
|
|
12
|
+
trailingSection?: SectionListData<ItemT, SectionT>;
|
|
13
|
+
};
|
|
14
|
+
type SectionHeaderItem<SectionT> = {
|
|
15
|
+
kind: "header";
|
|
16
|
+
key: string;
|
|
17
|
+
section: SectionT;
|
|
18
|
+
sectionIndex: number;
|
|
19
|
+
};
|
|
20
|
+
type SectionFooterItem<SectionT> = {
|
|
21
|
+
kind: "footer";
|
|
22
|
+
key: string;
|
|
23
|
+
section: SectionT;
|
|
24
|
+
sectionIndex: number;
|
|
25
|
+
};
|
|
26
|
+
type SectionBodyItem<ItemT, SectionT> = {
|
|
27
|
+
kind: "item";
|
|
28
|
+
key: string;
|
|
29
|
+
section: SectionT;
|
|
30
|
+
sectionIndex: number;
|
|
31
|
+
item: ItemT;
|
|
32
|
+
itemIndex: number;
|
|
33
|
+
absoluteItemIndex: number;
|
|
34
|
+
};
|
|
35
|
+
type SectionItemSeparator<ItemT, SectionT> = {
|
|
36
|
+
kind: "item-separator";
|
|
37
|
+
key: string;
|
|
38
|
+
section: SectionT;
|
|
39
|
+
sectionIndex: number;
|
|
40
|
+
leadingItem: ItemT;
|
|
41
|
+
leadingItemIndex: number;
|
|
42
|
+
trailingItem?: ItemT;
|
|
43
|
+
};
|
|
44
|
+
type SectionSeparator<SectionT> = {
|
|
45
|
+
kind: "section-separator";
|
|
46
|
+
key: string;
|
|
47
|
+
leadingSection: SectionT;
|
|
48
|
+
leadingSectionIndex: number;
|
|
49
|
+
trailingSection?: SectionT;
|
|
50
|
+
};
|
|
51
|
+
type FlatSectionListItem<ItemT, SectionT> = SectionHeaderItem<SectionT> | SectionFooterItem<SectionT> | SectionBodyItem<ItemT, SectionT> | SectionItemSeparator<ItemT, SectionT> | SectionSeparator<SectionT>;
|
|
52
|
+
type SectionMeta = {
|
|
53
|
+
header?: number;
|
|
54
|
+
footer?: number;
|
|
55
|
+
items: number[];
|
|
56
|
+
};
|
|
57
|
+
type BuildSectionListDataResult<ItemT, SectionT> = {
|
|
58
|
+
data: Array<FlatSectionListItem<ItemT, SectionT>>;
|
|
59
|
+
sectionMeta: SectionMeta[];
|
|
60
|
+
stickyHeaderIndices: number[];
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type SectionListViewToken<ItemT, SectionT> = {
|
|
64
|
+
item: ItemT;
|
|
65
|
+
key: string;
|
|
66
|
+
index: number;
|
|
67
|
+
isViewable: boolean;
|
|
68
|
+
section: SectionListData<ItemT, SectionT>;
|
|
69
|
+
};
|
|
70
|
+
type SectionListOnViewableItemsChanged<ItemT, SectionT> = ((info: {
|
|
71
|
+
viewableItems: Array<SectionListViewToken<ItemT, SectionT>>;
|
|
72
|
+
changed: Array<SectionListViewToken<ItemT, SectionT>>;
|
|
73
|
+
}) => void) | null;
|
|
74
|
+
type SectionListLegendProps<ItemT, SectionT> = Omit<LegendListProps<FlatSectionListItem<ItemT, SectionT>>, "data" | "children" | "renderItem" | "keyExtractor" | "ItemSeparatorComponent" | "getItemType" | "getFixedItemSize" | "stickyHeaderIndices" | "numColumns" | "columnWrapperStyle" | "onViewableItemsChanged">;
|
|
75
|
+
type SectionListProps<ItemT, SectionT extends SectionBase<ItemT> = SectionBase<ItemT>> = SectionListLegendProps<ItemT, SectionT> & {
|
|
76
|
+
sections: ReadonlyArray<SectionListData<ItemT, SectionT>>;
|
|
77
|
+
extraData?: any;
|
|
78
|
+
renderItem?: (info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactElement | null;
|
|
79
|
+
renderSectionHeader?: (info: {
|
|
80
|
+
section: SectionListData<ItemT, SectionT>;
|
|
81
|
+
}) => React.ReactElement | null;
|
|
82
|
+
renderSectionFooter?: (info: {
|
|
83
|
+
section: SectionListData<ItemT, SectionT>;
|
|
84
|
+
}) => React.ReactElement | null;
|
|
85
|
+
ItemSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null;
|
|
86
|
+
SectionSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | React.ReactElement | null;
|
|
87
|
+
keyExtractor?: (item: ItemT, index: number) => string;
|
|
88
|
+
stickySectionHeadersEnabled?: boolean;
|
|
89
|
+
onViewableItemsChanged?: SectionListOnViewableItemsChanged<ItemT, SectionT>;
|
|
90
|
+
};
|
|
91
|
+
type SectionListRef = LegendListRef & {
|
|
92
|
+
scrollToLocation(params: SectionListScrollParams): void;
|
|
93
|
+
};
|
|
94
|
+
declare const SectionList: (<ItemT, SectionT extends SectionBase<ItemT, react_native.DefaultSectionT>>(props: SectionListLegendProps<ItemT, SectionT> & {
|
|
95
|
+
sections: readonly SectionListData<ItemT, SectionT>[];
|
|
96
|
+
extraData?: any;
|
|
97
|
+
renderItem?: ((info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactElement | null) | undefined;
|
|
98
|
+
renderSectionHeader?: ((info: {
|
|
99
|
+
section: SectionListData<ItemT, SectionT>;
|
|
100
|
+
}) => React.ReactElement | null) | undefined;
|
|
101
|
+
renderSectionFooter?: ((info: {
|
|
102
|
+
section: SectionListData<ItemT, SectionT>;
|
|
103
|
+
}) => React.ReactElement | null) | undefined;
|
|
104
|
+
ItemSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null | undefined;
|
|
105
|
+
SectionSeparatorComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null | undefined;
|
|
106
|
+
keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
|
|
107
|
+
stickySectionHeadersEnabled?: boolean;
|
|
108
|
+
onViewableItemsChanged?: SectionListOnViewableItemsChanged<ItemT, SectionT> | undefined;
|
|
109
|
+
} & React.RefAttributes<SectionListRef>) => React.ReactNode) & {
|
|
110
|
+
displayName?: string;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export { type BuildSectionListDataResult, type FlatSectionListItem, SectionList, type SectionListOnViewableItemsChanged, type SectionListProps, type SectionListRef, type SectionListSeparatorProps, type SectionListViewToken, type SectionMeta };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as react_native from 'react-native';
|
|
2
|
+
import { SectionListData, SectionBase, SectionListRenderItemInfo, SectionListScrollParams } from 'react-native';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { a as LegendListRef, L as LegendListProps } from './types-JPHClxiw.js';
|
|
5
|
+
import 'react-native-reanimated';
|
|
6
|
+
|
|
7
|
+
type SectionListSeparatorProps<ItemT, SectionT> = {
|
|
8
|
+
leadingItem?: ItemT;
|
|
9
|
+
leadingSection?: SectionListData<ItemT, SectionT>;
|
|
10
|
+
section: SectionListData<ItemT, SectionT>;
|
|
11
|
+
trailingItem?: ItemT;
|
|
12
|
+
trailingSection?: SectionListData<ItemT, SectionT>;
|
|
13
|
+
};
|
|
14
|
+
type SectionHeaderItem<SectionT> = {
|
|
15
|
+
kind: "header";
|
|
16
|
+
key: string;
|
|
17
|
+
section: SectionT;
|
|
18
|
+
sectionIndex: number;
|
|
19
|
+
};
|
|
20
|
+
type SectionFooterItem<SectionT> = {
|
|
21
|
+
kind: "footer";
|
|
22
|
+
key: string;
|
|
23
|
+
section: SectionT;
|
|
24
|
+
sectionIndex: number;
|
|
25
|
+
};
|
|
26
|
+
type SectionBodyItem<ItemT, SectionT> = {
|
|
27
|
+
kind: "item";
|
|
28
|
+
key: string;
|
|
29
|
+
section: SectionT;
|
|
30
|
+
sectionIndex: number;
|
|
31
|
+
item: ItemT;
|
|
32
|
+
itemIndex: number;
|
|
33
|
+
absoluteItemIndex: number;
|
|
34
|
+
};
|
|
35
|
+
type SectionItemSeparator<ItemT, SectionT> = {
|
|
36
|
+
kind: "item-separator";
|
|
37
|
+
key: string;
|
|
38
|
+
section: SectionT;
|
|
39
|
+
sectionIndex: number;
|
|
40
|
+
leadingItem: ItemT;
|
|
41
|
+
leadingItemIndex: number;
|
|
42
|
+
trailingItem?: ItemT;
|
|
43
|
+
};
|
|
44
|
+
type SectionSeparator<SectionT> = {
|
|
45
|
+
kind: "section-separator";
|
|
46
|
+
key: string;
|
|
47
|
+
leadingSection: SectionT;
|
|
48
|
+
leadingSectionIndex: number;
|
|
49
|
+
trailingSection?: SectionT;
|
|
50
|
+
};
|
|
51
|
+
type FlatSectionListItem<ItemT, SectionT> = SectionHeaderItem<SectionT> | SectionFooterItem<SectionT> | SectionBodyItem<ItemT, SectionT> | SectionItemSeparator<ItemT, SectionT> | SectionSeparator<SectionT>;
|
|
52
|
+
type SectionMeta = {
|
|
53
|
+
header?: number;
|
|
54
|
+
footer?: number;
|
|
55
|
+
items: number[];
|
|
56
|
+
};
|
|
57
|
+
type BuildSectionListDataResult<ItemT, SectionT> = {
|
|
58
|
+
data: Array<FlatSectionListItem<ItemT, SectionT>>;
|
|
59
|
+
sectionMeta: SectionMeta[];
|
|
60
|
+
stickyHeaderIndices: number[];
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type SectionListViewToken<ItemT, SectionT> = {
|
|
64
|
+
item: ItemT;
|
|
65
|
+
key: string;
|
|
66
|
+
index: number;
|
|
67
|
+
isViewable: boolean;
|
|
68
|
+
section: SectionListData<ItemT, SectionT>;
|
|
69
|
+
};
|
|
70
|
+
type SectionListOnViewableItemsChanged<ItemT, SectionT> = ((info: {
|
|
71
|
+
viewableItems: Array<SectionListViewToken<ItemT, SectionT>>;
|
|
72
|
+
changed: Array<SectionListViewToken<ItemT, SectionT>>;
|
|
73
|
+
}) => void) | null;
|
|
74
|
+
type SectionListLegendProps<ItemT, SectionT> = Omit<LegendListProps<FlatSectionListItem<ItemT, SectionT>>, "data" | "children" | "renderItem" | "keyExtractor" | "ItemSeparatorComponent" | "getItemType" | "getFixedItemSize" | "stickyHeaderIndices" | "numColumns" | "columnWrapperStyle" | "onViewableItemsChanged">;
|
|
75
|
+
type SectionListProps<ItemT, SectionT extends SectionBase<ItemT> = SectionBase<ItemT>> = SectionListLegendProps<ItemT, SectionT> & {
|
|
76
|
+
sections: ReadonlyArray<SectionListData<ItemT, SectionT>>;
|
|
77
|
+
extraData?: any;
|
|
78
|
+
renderItem?: (info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactElement | null;
|
|
79
|
+
renderSectionHeader?: (info: {
|
|
80
|
+
section: SectionListData<ItemT, SectionT>;
|
|
81
|
+
}) => React.ReactElement | null;
|
|
82
|
+
renderSectionFooter?: (info: {
|
|
83
|
+
section: SectionListData<ItemT, SectionT>;
|
|
84
|
+
}) => React.ReactElement | null;
|
|
85
|
+
ItemSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null;
|
|
86
|
+
SectionSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | React.ReactElement | null;
|
|
87
|
+
keyExtractor?: (item: ItemT, index: number) => string;
|
|
88
|
+
stickySectionHeadersEnabled?: boolean;
|
|
89
|
+
onViewableItemsChanged?: SectionListOnViewableItemsChanged<ItemT, SectionT>;
|
|
90
|
+
};
|
|
91
|
+
type SectionListRef = LegendListRef & {
|
|
92
|
+
scrollToLocation(params: SectionListScrollParams): void;
|
|
93
|
+
};
|
|
94
|
+
declare const SectionList: (<ItemT, SectionT extends SectionBase<ItemT, react_native.DefaultSectionT>>(props: SectionListLegendProps<ItemT, SectionT> & {
|
|
95
|
+
sections: readonly SectionListData<ItemT, SectionT>[];
|
|
96
|
+
extraData?: any;
|
|
97
|
+
renderItem?: ((info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactElement | null) | undefined;
|
|
98
|
+
renderSectionHeader?: ((info: {
|
|
99
|
+
section: SectionListData<ItemT, SectionT>;
|
|
100
|
+
}) => React.ReactElement | null) | undefined;
|
|
101
|
+
renderSectionFooter?: ((info: {
|
|
102
|
+
section: SectionListData<ItemT, SectionT>;
|
|
103
|
+
}) => React.ReactElement | null) | undefined;
|
|
104
|
+
ItemSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null | undefined;
|
|
105
|
+
SectionSeparatorComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null | undefined;
|
|
106
|
+
keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
|
|
107
|
+
stickySectionHeadersEnabled?: boolean;
|
|
108
|
+
onViewableItemsChanged?: SectionListOnViewableItemsChanged<ItemT, SectionT> | undefined;
|
|
109
|
+
} & React.RefAttributes<SectionListRef>) => React.ReactNode) & {
|
|
110
|
+
displayName?: string;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export { type BuildSectionListDataResult, type FlatSectionListItem, SectionList, type SectionListOnViewableItemsChanged, type SectionListProps, type SectionListRef, type SectionListSeparatorProps, type SectionListViewToken, type SectionMeta };
|