@react-native-tvos/virtualized-lists 0.85.3-1 → 0.86.0-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.
|
@@ -22,7 +22,7 @@ import * as React from 'react';
|
|
|
22
22
|
*/
|
|
23
23
|
export default class StateSafePureComponent<
|
|
24
24
|
Props,
|
|
25
|
-
State
|
|
25
|
+
State extends interface {},
|
|
26
26
|
> extends React.PureComponent<Props, State> {
|
|
27
27
|
_inAsyncStateUpdate = false;
|
|
28
28
|
|
|
@@ -32,7 +32,7 @@ export default class StateSafePureComponent<
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// $FlowFixMe[incompatible-type]
|
|
35
|
-
setState<K
|
|
35
|
+
setState<K extends keyof State>(
|
|
36
36
|
partialState: ?(Pick<State, K> | ((State, Props) => ?Pick<State, K>)),
|
|
37
37
|
callback?: () => unknown,
|
|
38
38
|
): void {
|
package/Lists/VirtualizedList.js
CHANGED
|
@@ -972,15 +972,15 @@ class VirtualizedList extends StateSafePureComponent<
|
|
|
972
972
|
// 2a. Add a cell for ListEmptyComponent if applicable
|
|
973
973
|
const itemCount = this.props.getItemCount(data);
|
|
974
974
|
if (itemCount === 0 && ListEmptyComponent) {
|
|
975
|
-
const element: ExactReactElement_DEPRECATED<any> = (
|
|
976
|
-
ListEmptyComponent
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
)
|
|
975
|
+
const element: ExactReactElement_DEPRECATED<any> = (
|
|
976
|
+
isValidElement(ListEmptyComponent) ? (
|
|
977
|
+
ListEmptyComponent
|
|
978
|
+
) : (
|
|
979
|
+
// $FlowFixMe[not-a-component]
|
|
980
|
+
// $FlowFixMe[incompatible-type]
|
|
981
|
+
<ListEmptyComponent />
|
|
982
|
+
)
|
|
983
|
+
) as any;
|
|
984
984
|
cells.push(
|
|
985
985
|
<VirtualizedListCellContextProvider
|
|
986
986
|
cellKey={this._getCellKey() + '-empty'}
|
|
@@ -131,7 +131,7 @@ type State = {childProps: VirtualizedListProps, ...};
|
|
|
131
131
|
*/
|
|
132
132
|
class VirtualizedSectionList<
|
|
133
133
|
ItemT,
|
|
134
|
-
SectionT
|
|
134
|
+
SectionT extends SectionBase<
|
|
135
135
|
ItemT,
|
|
136
136
|
DefaultVirtualizedSectionT,
|
|
137
137
|
> = DefaultVirtualizedSectionT,
|
|
@@ -189,7 +189,7 @@ class VirtualizedSectionList<
|
|
|
189
189
|
const listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0;
|
|
190
190
|
|
|
191
191
|
const stickyHeaderIndices = this.props.stickySectionHeadersEnabled
|
|
192
|
-
? ([]
|
|
192
|
+
? ([] as Array<number>)
|
|
193
193
|
: undefined;
|
|
194
194
|
|
|
195
195
|
let itemCount = 0;
|
|
@@ -615,7 +615,7 @@ function ItemWithSeparator<ItemT>(
|
|
|
615
615
|
highlighted={leadingSeparatorHiglighted}
|
|
616
616
|
{...leadingSeparatorProps}
|
|
617
617
|
/>
|
|
618
|
-
))
|
|
618
|
+
)) as any);
|
|
619
619
|
const separator =
|
|
620
620
|
SeparatorComponent != null &&
|
|
621
621
|
((React.isValidElement(SeparatorComponent) ? (
|
|
@@ -627,7 +627,7 @@ function ItemWithSeparator<ItemT>(
|
|
|
627
627
|
highlighted={separatorHighlighted}
|
|
628
628
|
{...separatorProps}
|
|
629
629
|
/>
|
|
630
|
-
))
|
|
630
|
+
)) as any);
|
|
631
631
|
const RenderSeparator = leadingSeparator || separator;
|
|
632
632
|
const firstSeparator = inverted === false ? leadingSeparator : separator;
|
|
633
633
|
const secondSeparator = inverted === false ? separator : leadingSeparator;
|
|
@@ -643,7 +643,7 @@ function ItemWithSeparator<ItemT>(
|
|
|
643
643
|
|
|
644
644
|
const VirtualizedSectionListComponent = VirtualizedSectionList as component<
|
|
645
645
|
ItemT,
|
|
646
|
-
SectionT
|
|
646
|
+
SectionT extends SectionBase<
|
|
647
647
|
ItemT,
|
|
648
648
|
DefaultVirtualizedSectionT,
|
|
649
649
|
> = DefaultVirtualizedSectionT,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-tvos/virtualized-lists",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.86.0-0",
|
|
4
4
|
"description": "Virtualized lists for React Native.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@types/react": "^19.2.0",
|
|
55
55
|
"react": "*",
|
|
56
|
-
"react-native": "0.
|
|
56
|
+
"react-native": "0.86.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"@types/react": {
|