maybe fix
This commit is contained in:
parent
a496e5ad2c
commit
d5620ae8b2
@ -49,6 +49,7 @@ class Main extends Component {
|
|||||||
new_index += this.state.photos.length
|
new_index += this.state.photos.length
|
||||||
}
|
}
|
||||||
this.setState({currentImage: new_index})
|
this.setState({currentImage: new_index})
|
||||||
|
this.carousel && this.carousel.setState({currentIndex: 1})
|
||||||
}
|
}
|
||||||
onSubmit(event){
|
onSubmit(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -94,8 +95,7 @@ class Main extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let carousel = <Carousel views={photos_carousel} currentIndex={0} trackProps={{onViewChange: (v) => this.onViewChange(v)}}/>
|
this.carousel = this.state.photoIsOpen && <Carousel views={photos_carousel} currentIndex={1} trackProps={{onViewChange: (v) => this.onViewChange(v)}}/>
|
||||||
carousel.setState({currentIndex: 1})
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user