Does not fit on this branch, but updated the key value, so it is concat of both id and index of the map function for search results. It was prev just the index, and when rapped this hits same value, which is unacceptable by react.
This commit is contained in:
@@ -35,6 +35,8 @@ class MovieObject {
|
||||
}
|
||||
|
||||
getElement(index) {
|
||||
const element_key = index + this.id;
|
||||
|
||||
// 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 +62,7 @@ class MovieObject {
|
||||
|
||||
|
||||
return (
|
||||
<div key={index}>
|
||||
<div key={element_key}>
|
||||
<Notifications />
|
||||
<div style={movieStyle.resultItem} key={this.id}>
|
||||
<MediaQuery minWidth={600}>
|
||||
|
||||
Reference in New Issue
Block a user