mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
return promise object from fetch
This commit is contained in:
parent
cfaabbb825
commit
6d2cf352c3
@ -65,7 +65,9 @@ var dataSource = new Table.DataSource({
|
||||
});
|
||||
|
||||
function fetch() {
|
||||
dataSource.fetch();
|
||||
dataSource.fetch().then(function() {
|
||||
console.log('fetch done');
|
||||
});
|
||||
}
|
||||
|
||||
React.render(<div>
|
||||
|
@ -349,7 +349,7 @@ var AntTable = React.createClass({
|
||||
}
|
||||
// remote 模式使用 this.dataSource
|
||||
let dataSource = this.getRemoteDataSource();
|
||||
jQuery.ajax({
|
||||
return jQuery.ajax({
|
||||
url: dataSource.url,
|
||||
data: dataSource.getParams.apply(this, this.prepareParamsArguments(state)) || {},
|
||||
headers: dataSource.headers,
|
||||
|
Loading…
Reference in New Issue
Block a user