Created
April 20, 2016 18:54
-
-
Save marinalohova/29b805661282994b645893ac22adaffb to your computer and use it in GitHub Desktop.
Why not use jQuery shorthands for ajax requests?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filterNetworks(value) { | |
$.ajax({ | |
url: this.props.url, | |
data: { | |
network: network, | |
page: pageNumber||1, | |
search: search | |
}, | |
dataType: 'json', | |
success: function (carts) { | |
this.setState({data:carts}); | |
}.bind(this), | |
error: function (xhr, status, err) { | |
}.bind(this) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment