@legendapp/list 3.0.0-beta.54 → 3.0.0-beta.56
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/animated.d.ts +16 -5
- package/index.d.ts +26 -6
- package/index.js +415 -103
- package/index.mjs +416 -104
- package/index.native.js +340 -79
- package/index.native.mjs +342 -81
- package/package.json +1 -1
- package/react-native.d.ts +16 -5
- package/react-native.js +342 -79
- package/react-native.mjs +344 -81
- package/react-native.web.d.ts +16 -5
- package/react-native.web.js +417 -103
- package/react-native.web.mjs +418 -104
- package/react.d.ts +16 -5
- package/react.js +417 -103
- package/react.mjs +418 -104
- package/reanimated.d.ts +16 -5
- package/reanimated.js +9 -8
- package/reanimated.mjs +9 -8
- package/section-list.d.ts +16 -5
package/react.d.ts
CHANGED
|
@@ -120,13 +120,11 @@ interface DataModeProps<ItemT, TItemType extends string | undefined> {
|
|
|
120
120
|
*/
|
|
121
121
|
data: ReadonlyArray<ItemT>;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* - A function: (props: LegendListRenderItemProps<ItemT>) => ReactNode
|
|
126
|
-
* - A React component: React.ComponentType<LegendListRenderItemProps<ItemT>>
|
|
123
|
+
* Callback to render each item in the list.
|
|
124
|
+
* To use hooks in an item component, return that component from this callback.
|
|
127
125
|
* @required when using data mode
|
|
128
126
|
*/
|
|
129
|
-
renderItem: (
|
|
127
|
+
renderItem: (props: LegendListRenderItemProps<ItemT, TItemType>) => React.ReactNode;
|
|
130
128
|
children?: never;
|
|
131
129
|
}
|
|
132
130
|
interface ChildrenModeProps {
|
|
@@ -257,6 +255,13 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
257
255
|
* Style for the header component.
|
|
258
256
|
*/
|
|
259
257
|
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
258
|
+
/**
|
|
259
|
+
* Estimated height of the ListHeaderComponent. Provide this when the expected header height
|
|
260
|
+
* is known before layout so that only the items actually visible below the header are rendered
|
|
261
|
+
* on the initial frame, rather than a full screen's worth of items that are hidden behind it.
|
|
262
|
+
* The measured header size still replaces this value after layout.
|
|
263
|
+
*/
|
|
264
|
+
estimatedHeaderSize?: number;
|
|
260
265
|
/**
|
|
261
266
|
* If true, auto-scrolls to end when new items are added.
|
|
262
267
|
* Use an options object to opt into specific triggers and control whether that scroll is animated.
|
|
@@ -291,6 +296,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
291
296
|
* @default 1
|
|
292
297
|
*/
|
|
293
298
|
numColumns?: number;
|
|
299
|
+
/**
|
|
300
|
+
* Force RTL mode for this list instance.
|
|
301
|
+
* When undefined, uses React Native's global I18nManager.isRTL.
|
|
302
|
+
* @default undefined
|
|
303
|
+
*/
|
|
304
|
+
rtl?: boolean;
|
|
294
305
|
/**
|
|
295
306
|
* Called when scrolling reaches the end within onEndReachedThreshold.
|
|
296
307
|
*/
|