Now searchRequest passes a index key to movieObject so that each div object can have a separate key.

This commit is contained in:
2017-10-06 12:20:51 +02:00
parent c954bd4874
commit 42749c5b64
2 changed files with 8 additions and 8 deletions

View File

@@ -34,7 +34,7 @@ class MovieObject {
notify.show(this.title + ' requested!', 'success', 3000);
}
getElement() {
getElement(index) {
// TODO set the poster image async by updating the dom after this is returned
if (this.poster == null || this.poster == undefined) {
var posterPath = 'https://openclipart.org/image/2400px/svg_to_png/211479/Simple-Image-Not-Found-Icon.png'
@@ -60,7 +60,7 @@ class MovieObject {
return (
<div>
<div key={index}>
<Notifications />
<div style={movieStyle.resultItem} key={this.id}>
<MediaQuery minWidth={600}>