Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 38bc300

Browse files
author
Karl Ranna
committed
Make transactions list header sticky
1 parent c76a759 commit 38bc300

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/view/transaction.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ const TransactionView = ({ store, nav, transaction }) => {
2828
<ListContent>
2929
<List
3030
data={transactions}
31-
renderHeader={() => <TransactionListHeader />}
31+
renderHeader={TransactionListHeader}
3232
renderItem={item => (
3333
<TransactionListItem
3434
tx={item}
3535
onSelect={() => transaction.select({ item })}
3636
/>
3737
)}
38+
stickyHeaderIndices={[0]}
3839
/>
3940
</ListContent>
4041
</Background>
@@ -123,10 +124,13 @@ const hStyles = StyleSheet.create({
123124
color: color.greyListHeader,
124125
fontSize: font.sizeXS,
125126
},
127+
header: {
128+
backgroundColor: color.blackDark,
129+
},
126130
});
127131

128132
const TransactionListHeader = () => (
129-
<ListHeader style={iStyles.item}>
133+
<ListHeader style={[iStyles.item, hStyles.header]}>
130134
<View style={iStyles.i} />
131135
<Text style={[iStyles.m, hStyles.txt]}>STATUS</Text>
132136
<Text style={[iStyles.m, hStyles.txt]}>DATE</Text>

0 commit comments

Comments
 (0)