@legendapp/list 0.3.2 → 0.3.4
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/README.md +2 -2
- package/index.d.mts +1 -5
- package/index.d.ts +1 -5
- package/index.js +344 -421
- package/index.mjs +346 -423
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ This is an early release to test and gather feedback. It's not used in productio
|
|
|
10
10
|
|
|
11
11
|
In addition to normal FlatList features:
|
|
12
12
|
|
|
13
|
-
- Dynamic layouts supported. Just use the `
|
|
13
|
+
- Dynamic layouts supported. Just use the `estimatedItemSize` prop to give a close estimate so that layouts aren't too far off, and positions will adjust while rendering.
|
|
14
14
|
- `maintainScrollAtEnd`: If true and scroll is within `maintainScrollAtEndThreshold * screen height` then changing items or heights will scroll to the bottom. This can be useful for chat interfaces.
|
|
15
15
|
- `recycleItems` prop enables toggling recycling of list items. If enabled it will reuse item components for improved performance, but it will reuse any local state in items. So if you have local state in items you likely want this disabled.
|
|
16
16
|
|
|
@@ -30,7 +30,7 @@ We suggest using all of the required props and additionally `keyExtractor` to im
|
|
|
30
30
|
interface PropsRequired {
|
|
31
31
|
data: ArrayLike<any> & T[];
|
|
32
32
|
renderItem: (props: LegendListRenderItemInfo<T>) => ReactNode;
|
|
33
|
-
|
|
33
|
+
estimatedItemSize: number;
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
package/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode, ForwardedRef, ReactElement } from 'react';
|
|
2
|
-
import { ScrollView, StyleProp, ViewStyle
|
|
2
|
+
import { ScrollView, StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
type LegendListProps<T> = Omit<ComponentProps<typeof ScrollView>, 'contentOffset'> & {
|
|
5
5
|
data: ArrayLike<any> & T[];
|
|
@@ -25,10 +25,6 @@ type LegendListProps<T> = Omit<ComponentProps<typeof ScrollView>, 'contentOffset
|
|
|
25
25
|
ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
|
|
26
26
|
ListFooterComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
27
27
|
ItemSeparatorComponent?: React.ComponentType<any>;
|
|
28
|
-
onViewableItemsChanged?: ((info: {
|
|
29
|
-
viewableItems: Array<ViewToken<T>>;
|
|
30
|
-
changed: Array<ViewToken<T>>;
|
|
31
|
-
}) => void) | null | undefined;
|
|
32
28
|
};
|
|
33
29
|
interface ViewableRange<T> {
|
|
34
30
|
startBuffered: number;
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode, ForwardedRef, ReactElement } from 'react';
|
|
2
|
-
import { ScrollView, StyleProp, ViewStyle
|
|
2
|
+
import { ScrollView, StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
type LegendListProps<T> = Omit<ComponentProps<typeof ScrollView>, 'contentOffset'> & {
|
|
5
5
|
data: ArrayLike<any> & T[];
|
|
@@ -25,10 +25,6 @@ type LegendListProps<T> = Omit<ComponentProps<typeof ScrollView>, 'contentOffset
|
|
|
25
25
|
ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
|
|
26
26
|
ListFooterComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
27
27
|
ItemSeparatorComponent?: React.ComponentType<any>;
|
|
28
|
-
onViewableItemsChanged?: ((info: {
|
|
29
|
-
viewableItems: Array<ViewToken<T>>;
|
|
30
|
-
changed: Array<ViewToken<T>>;
|
|
31
|
-
}) => void) | null | undefined;
|
|
32
28
|
};
|
|
33
29
|
interface ViewableRange<T> {
|
|
34
30
|
startBuffered: number;
|