forked from Expensify/App
-
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.
workaround: invert list manually on android
- Loading branch information
Showing
5 changed files
with
86 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React, {forwardRef} from 'react'; | ||
import {View} from 'react-native'; | ||
import BaseInvertedFlatList from './BaseInvertedFlatList'; | ||
import styles from '../../styles/styles'; | ||
|
||
const InvertedCell = props => ( | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
<View style={styles.invert} {...props} /> | ||
); | ||
|
||
export default forwardRef((props, ref) => ( | ||
<BaseInvertedFlatList | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
ref={ref} | ||
|
||
// we manually invert the FlatList to circumvent a react-native bug that causes ANR on android 13 | ||
inverted={false} | ||
style={styles.invert} | ||
verticalScrollbarPosition="left" // we are mirroring the X and Y axis, so we need to swap the scrollbar position | ||
|
||
CellRendererComponent={InvertedCell} | ||
/> | ||
)); |
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