|
@@ -943,21 +943,14 @@
|
|
|
*/
|
|
*/
|
|
|
BootstrapTable.prototype.initData = function (data, type) {
|
|
BootstrapTable.prototype.initData = function (data, type) {
|
|
|
if (type === 'append') {
|
|
if (type === 'append') {
|
|
|
- this.data = this.data.concat(data);
|
|
|
|
|
- } else if (type === 'prepend') {
|
|
|
|
|
- this.data = [].concat(data).concat(this.data);
|
|
|
|
|
- } else {
|
|
|
|
|
- this.data = data || this.options.data;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Fix #839 Records deleted when adding new row on filtered table
|
|
|
|
|
- if (type === 'append') {
|
|
|
|
|
this.options.data = this.options.data.concat(data);
|
|
this.options.data = this.options.data.concat(data);
|
|
|
} else if (type === 'prepend') {
|
|
} else if (type === 'prepend') {
|
|
|
this.options.data = [].concat(data).concat(this.options.data);
|
|
this.options.data = [].concat(data).concat(this.options.data);
|
|
|
} else {
|
|
} else {
|
|
|
- this.options.data = this.data;
|
|
|
|
|
|
|
+ this.options.data = data || this.options.data;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ this.data = this.options.data;
|
|
|
|
|
|
|
|
if (this.options.sidePagination === 'server') {
|
|
if (this.options.sidePagination === 'server') {
|
|
|
return;
|
|
return;
|