forked from GeekyAnts/NativeBase
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from tiberiumihai/fix-initial-page-for-tabs
Fix initialPage for Tabs
- Loading branch information
Showing
9 changed files
with
49 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import ViewPropTypes from './viewPropTypes' | ||
import InteractionManager from './interactionManager' | ||
|
||
export { ViewPropTypes } | ||
export { InteractionManager, ViewPropTypes } |
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,15 @@ | ||
import { InteractionManager } from "react-native"; | ||
export default { | ||
...InteractionManager, | ||
runAfterInteractions: f => { | ||
// ensure f get called, timeout at 10ms | ||
// @gre workaround https://github.com/facebook/react-native/issues/8624 | ||
let called = false; | ||
const timeout = setTimeout(() => { called = true; f() }, 10); | ||
InteractionManager.runAfterInteractions(() => { | ||
if (called) return; | ||
clearTimeout(timeout); | ||
f(); | ||
}); | ||
} | ||
}; |
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