I am using TextInputMask
to set the currency. When I use it in the ListIstem
element, it comes with other elements as "object".
Sample code:
<FlatList
data={teams}
renderItem={({item}) =>
<ListItem
title={item.team}
subtitle={
<TextInputMask
type={'money'}
options={{ precision: 2, separator: ',', delimiter: '.', unit: '' }}
value={parseFloat(item.amount)}
/> + 'Count: ' + item.count
}
bottomDivider={true}
/>
}
keyExtractor={this.keyExtractor}
/>
Output;
[object Object] Count: 6
``