gab
Plain text
code posted
by
gab
created at 25 Apr 10:28, updated at 25 Apr 12:15
Edit
|
Back
1 2 3 4 5 6 7 |
render: function(){
var chicken = this //means to whatever
var filter = items.filter(function(item){
return ((item.category === chicken.props.category) && item.name.indexOf(chicken.props.query) !== -1)
//means when evaluating eg <DataRow category={"Electronics"}/> above, this.props.category is Electronics
//have to use chicken instead of this because this would refer to what called it, ie var filter function.
}) |
502 Bytes in 2 ms with coderay