Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
2,635 additions
and
2,614 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
.yarn/patches/@mattermost-react-native-paste-input-npm-0.6.2-e109419dfb.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,50 @@ | ||
diff --git a/src/android.js b/src/android.js | ||
index fbf09855771f985c5edfc53c22cf6cfe828f45f9..7751d456e08e2dc4c78601fc9430fdbf1373e0d4 100644 | ||
--- a/src/android.js | ||
+++ b/src/android.js | ||
@@ -16,7 +16,7 @@ import TextAncestor from 'react-native/Libraries/Text/TextAncestor'; | ||
import TextInputState from 'react-native/Libraries/Components/TextInput/TextInputState'; | ||
import invariant from 'invariant'; | ||
import nullthrows from 'nullthrows'; | ||
-import setAndForwardRef from 'react-native/Libraries/Utilities/setAndForwardRef'; | ||
+import setAndForwardRef from './setAndForwardRef'; | ||
|
||
import usePressability from 'react-native/Libraries/Pressability/usePressability'; | ||
|
||
diff --git a/src/ios.tsx b/src/ios.tsx | ||
index b9ed28bbf9fca6fb44c27096e771d8d2b65b858f..588a75c82b2ee1123d3e48acb984bcbc8b293cc8 100644 | ||
--- a/src/ios.tsx | ||
+++ b/src/ios.tsx | ||
@@ -11,7 +11,7 @@ import { | ||
} from 'react-native'; | ||
import TextInputState from 'react-native/Libraries/Components/TextInput/TextInputState'; | ||
import TextAncestor from 'react-native/Libraries/Text/TextAncestor'; | ||
-import setAndForwardRef from 'react-native/Libraries/Utilities/setAndForwardRef'; | ||
+import setAndForwardRef from './setAndForwardRef'; | ||
import { getTextInputExtraProps } from './extra_props'; | ||
|
||
import type { | ||
diff --git a/src/setAndForwardRef.js b/src/setAndForwardRef.js | ||
new file mode 100644 | ||
index 0000000000000000000000000000000000000000..ad7777e271b945c7123953f7578a8d1208ca9e48 | ||
--- /dev/null | ||
+++ b/src/setAndForwardRef.js | ||
@@ -0,0 +1,17 @@ | ||
+function setAndForwardRef({ getForwardedRef, setLocalRef }) { | ||
+ return function forwardRef(ref) { | ||
+ const forwardedRef = getForwardedRef(); | ||
+ | ||
+ setLocalRef(ref); | ||
+ | ||
+ // Forward to user ref prop (if one has been specified) | ||
+ if (typeof forwardedRef === 'function') { | ||
+ // Handle function-based refs. String-based refs are handled as functions. | ||
+ forwardedRef(ref); | ||
+ } else if (typeof forwardedRef === 'object' && forwardedRef != null) { | ||
+ // Handle createRef-based refs | ||
+ forwardedRef.current = ref; | ||
+ } | ||
+ }; | ||
+} | ||
+export default setAndForwardRef; | ||
\ No newline at end of file |
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
Oops, something went wrong.