@mozaic-ds/vue 0.14.3-beta.0 → 0.14.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/mozaic-vue.adeo.umd.js +59 -47
- package/dist/mozaic-vue.common.js +59 -47
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.umd.js +59 -47
- package/dist/mozaic-vue.umd.js.map +1 -1
- package/dist/mozaic-vue.umd.min.js +1 -1
- package/dist/mozaic-vue.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/datatable/MDataTable.vue +14 -1
package/package.json
CHANGED
|
@@ -465,6 +465,19 @@ export default {
|
|
|
465
465
|
};
|
|
466
466
|
},
|
|
467
467
|
|
|
468
|
+
checkIfPromise(promise) {
|
|
469
|
+
return !!promise && typeof promise.then === 'function';
|
|
470
|
+
},
|
|
471
|
+
|
|
472
|
+
setTotal() {
|
|
473
|
+
if (Array.isArray(this.source)) {
|
|
474
|
+
this.total = this.source.length;
|
|
475
|
+
}
|
|
476
|
+
else if (this.source instanceof Function && !this.checkIfPromise(this.source())) {
|
|
477
|
+
this.total = this.source().length;
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
|
|
468
481
|
/** Load data. */
|
|
469
482
|
async load() {
|
|
470
483
|
this.loading = true;
|
|
@@ -474,7 +487,7 @@ export default {
|
|
|
474
487
|
}
|
|
475
488
|
|
|
476
489
|
try {
|
|
477
|
-
this.
|
|
490
|
+
this.setTotal();
|
|
478
491
|
|
|
479
492
|
const options = buildOptions(
|
|
480
493
|
this.pagingOptions.enabled,
|