You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TableViewComponent is a custom component. I am able to scroll horizontally but not vertically because the FlatList is wrapped inside a ScrollView.
ScrollView handles horizontal scrolling.
FlatList is used for vertical scrolling.
After adding testIDs:
Horizontal scrolling works automatically.
Vertical scrolling does not work in Detox automation testing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
const TableViewComponent = ({
tableHead,
tableData,
onPressColumn,
activeTab,
verticalTestID,
horizontalTestID,
}) => {
return (
{activeTab == 0 ? (
<Text style={{ paddingStart: 5, color: "#EF314C" }}>
Column Options
{tableHead?.length > 0 && (
<Row
data={tableHead}
style={styles.header}
widthArr={Array(tableHead.length - 1).fill(130)}
textStyle={{ ...styles.text, color: "#EF314C", padding: 5 }}
borderStyle={{ borderWidth: 1, borderColor: colors.GREY }}
/>
)}
{tableData?.length >= 0 && (
<FlatList
style={styles.dataWrapper}
contentContainerStyle={{ flexGrow: 1 }}
nestedScrollEnabled={true}
testID={verticalTestID}
keyboardShouldPersistTaps="handled"
data={tableData}
keyExtractor={(item, index) => index.toString()}
renderItem={({ item: rowData, index }) => (
<View style={{ borderWidth: 1, borderColor: colors.GREY }}>
<Row
key={index}
data={rowData}
widthArr={Array(rowData.length - 1).fill(130)}
style={styles.row}
textStyle={styles.text}
/>
)}
/>
);
};
TableViewComponent is a custom component. I am able to scroll horizontally but not vertically because the FlatList is wrapped inside a ScrollView.
ScrollView handles horizontal scrolling.
FlatList is used for vertical scrolling.
After adding testIDs:
Horizontal scrolling works automatically.
Vertical scrolling does not work in Detox automation testing.
Beta Was this translation helpful? Give feedback.
All reactions