Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e23480b2f |
@ -65,6 +65,20 @@ const data = {
|
||||
};
|
||||
|
||||
class Horizontal extends Component {
|
||||
state = {data};
|
||||
|
||||
componentDidMount() {
|
||||
setTimeout(() => {
|
||||
this.setState(({data}) => {
|
||||
const nextData = {...data};
|
||||
|
||||
delete nextData[1];
|
||||
|
||||
return {data: nextData};
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
@ -73,7 +87,7 @@ class Horizontal extends Component {
|
||||
horizontal
|
||||
style={styles.list}
|
||||
contentContainerStyle={styles.contentContainer}
|
||||
data={data}
|
||||
data={this.state.data}
|
||||
renderRow={this._renderRow} />
|
||||
</View>
|
||||
);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "16.0.0-alpha.12",
|
||||
"react-native": "0.46.3",
|
||||
"react-native-sortable-list": "file:../.."
|
||||
"react-native": "0.47.1",
|
||||
"react-native-sortable-list": "0.0.16"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user