Skip to content

Instantly share code, notes, and snippets.

@walidvb
Created June 25, 2015 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walidvb/48d4dd612b1717dce34e to your computer and use it in GitHub Desktop.
Save walidvb/48d4dd612b1717dce34e to your computer and use it in GitHub Desktop.
Knowing which Select was triggered
var App = React.createClass({
userTr: function(user){
var success = function(res){this.setState(res)};
var updateUserWith() = function(){
return function(value){
$.ajax('/users/'+user.id, {property: value}, sucess);
};
}
return (
<Reactable.Tr>
<Reactable.Td>
<Select onChange={updateUserWith()}></Select>
</Reactable.Td>
</Reactable.Tr>
);
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment