Add variable to closure to delete correct suggestion
This commit is contained in:
parent
d8fdf68cbb
commit
c4ea521e52
@ -67,8 +67,9 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
var localSuggestion = suggestion;
|
||||||
var popFunction = function(){
|
var popFunction = function(){
|
||||||
return function(){self.props.removeSuggestion(suggestion);};
|
return function(){self.props.removeSuggestion(localSuggestion);};
|
||||||
}();
|
}();
|
||||||
suggestions.push((
|
suggestions.push((
|
||||||
<Row key={suggestion.SuggestionId}><Panel>
|
<Row key={suggestion.SuggestionId}><Panel>
|
||||||
|
Loading…
Reference in New Issue
Block a user