-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch FlashList to fix
scrollTo
from UI thread
- Loading branch information
Showing
7 changed files
with
63 additions
and
12 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
.yarn/patches/@shopify-flash-list-npm-1.7.2-2a363895ca.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/package.json b/package.json | ||
index b30a5bacd99db50c5d09d7662f06bfbccca599a1..9915fa6b5d96243a00e16100da605e0f9596bf53 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -26,6 +26,7 @@ | ||
"license": "MIT", | ||
"homepage": "https://shopify.github.io/flash-list/", | ||
"main": "dist/index.js", | ||
+ "react-native": "src/index.ts", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"up": "bundle install && yarn fixture:rn:up && yarn e2e:up && yarn build", | ||
diff --git a/src/FlashList.tsx b/src/FlashList.tsx | ||
index 0e9f071a53d113e85f3099ccf239d1f3d06361b6..877896f778b4fa27977b1aed9b550e2880c11e79 100644 | ||
--- a/src/FlashList.tsx | ||
+++ b/src/FlashList.tsx | ||
@@ -4,6 +4,7 @@ import { | ||
RefreshControl, | ||
LayoutChangeEvent, | ||
NativeSyntheticEvent, | ||
+ ScrollViewComponent, | ||
StyleSheet, | ||
NativeScrollEvent, | ||
} from "react-native"; | ||
@@ -842,6 +843,12 @@ class FlashList<T> extends React.PureComponent< | ||
return this.rlvRef?.getScrollableNode?.() || null; | ||
} | ||
|
||
+ public getNativeScrollRef(): React.ElementRef< | ||
+ typeof ScrollViewComponent | ||
+ > | null { | ||
+ return this.rlvRef?.getNativeScrollRef?.() || null; | ||
+ } | ||
+ | ||
/** | ||
* Allows access to internal recyclerlistview. This is useful for enabling access to its public APIs. | ||
* Warning: We may swap recyclerlistview for something else in the future. Use with caution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters