How Swipable List use FlatList not ListView?
See original GitHub issuereact-native, react and native-base version
react-native 0.49 react 16.0.0 native-base 2.3.4
Expected behaviour
Use Swipable List with recommended FlatList
Actual behaviour
Now the example in the docs using Swipable List with depleted ListView
Steps to reproduce (code snippet or screenshot)
render() {
const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });
return (
<Container>
<Header />
<Content>
<List
dataSource={this.ds.cloneWithRows(this.state.listViewData)}
renderRow={data =>
<ListItem>
<Text> {data} </Text>
</ListItem>}
renderLeftHiddenRow={data =>
<Button full onPress={() => alert(data)}>
<Icon active name="information-circle" />
</Button>}
renderRightHiddenRow={(data, secId, rowId, rowMap) =>
<Button full danger onPress={_ => this.deleteRow(secId, rowId, rowMap)}>
<Icon active name="trash" />
</Button>}
leftOpenValue={75}
rightOpenValue={-75}
/>
</Content>
</Container>
);
Question
How can I use FlatList
with Swipeable List and Swipeable Row?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
how to get current flat list item data in reactnative using react ...
I'm not getting how to get the current item object of a flat list. I used react-native-swipeout and react-native-swipe-list-view and in both ...
Read more >react-native-swipe-list-view-fix - npm
ListView that renders SwipeRows. Props. useFlatList. Render list using React Native's FlatList. type: bool. defaultValue: ...
Read more >FlatList - React Native
FlatList. A performant interface for rendering basic, flat lists, supporting the most handy features: Fully cross-platform.
Read more >Swipe List - NativeBase
Swipe List. SwipeListView is a vertical ListView with rows that swipe open and closed. ... Here is an example to show how easily...
Read more >React Native Show Message for empty FlatList
Here is some line of code that we have used to show the message for the empty List. <FlatList data={dataSource} keyExtractor={(item, index) =>...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Jancat Pasting a sample code
Gif
@akhil-geekyants do you know if NativeBase ever switched over to
FlatList
?