Uncaught TypeError: Cannot read property 'status' of undefined
See original GitHub issuewhen using bootstrap-table 4 I get the above error message but not with version 3.
Function:
function get(params) { var obj = { action: 'get', offset: params.data.offset, limit: params.data.limit }; callService($.param(obj), function(rs) { params.success({rows:rs.data, total:rs.total}); $table.bootstrapTable('hideColumn', 'jobId'); }); }
the callService is an Ajax request.
function callService(data, cb) { var ajaxCall = $.ajax({ cache: false, type: 'POST', data: data, dataType: 'json', }); ajaxCall.done(function(data) { cb(data); }); ajaxCall.fail(function(jqXHR, textStatus, errorThrown) { console.log(textStatus + ': ' + errorThrown); }); }
data returned:
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (1 by maintainers)
Top GitHub Comments
It’s no need to update the source, a workaround: https://live.bootstrap-table.com/code/wenzhixin/1246
Just an update, develop doesn’t work either. Data never shows. The issue is textStatus and jqXHR are always undefined. Comment it out and it works as expected. _this10.trigger(‘load-success’, res);//, jqXHR.status, jqXHR