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