innoboxrr-vue-datatable 1.1.4 → 1.1.6
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/package.json +25 -25
- package/src/DataTable.vue +28 -7
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "innoboxrr-vue-datatable",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Datatable para vue3",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/innoboxrr/vue-datatable.git"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"vue3",
|
|
15
|
-
"datatable",
|
|
16
|
-
"table",
|
|
17
|
-
"crud"
|
|
18
|
-
],
|
|
19
|
-
"author": "Homero Raul Vargas Cruz",
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/innoboxrr/vue-datatable/issues"
|
|
23
|
-
},
|
|
24
|
-
"homepage": "https://github.com/innoboxrr/vue-datatable#readme"
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "innoboxrr-vue-datatable",
|
|
3
|
+
"version": "1.1.6",
|
|
4
|
+
"description": "Datatable para vue3",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/innoboxrr/vue-datatable.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"vue3",
|
|
15
|
+
"datatable",
|
|
16
|
+
"table",
|
|
17
|
+
"crud"
|
|
18
|
+
],
|
|
19
|
+
"author": "Homero Raul Vargas Cruz",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/innoboxrr/vue-datatable/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/innoboxrr/vue-datatable#readme"
|
|
25
|
+
}
|
package/src/DataTable.vue
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}">
|
|
123
123
|
|
|
124
124
|
<div
|
|
125
|
-
class="uk-card uk-card-body uk-border-rounded uk-
|
|
125
|
+
class="uk-card uk-card-body uk-border-rounded uk-padding-small"
|
|
126
126
|
:class="{
|
|
127
127
|
'uk-card-default': cardWrapper
|
|
128
128
|
}">
|
|
@@ -281,6 +281,8 @@
|
|
|
281
281
|
sort: this.model.dataTableSort(),
|
|
282
282
|
|
|
283
283
|
orderBy: 'id',
|
|
284
|
+
|
|
285
|
+
internalSort: false,
|
|
284
286
|
|
|
285
287
|
page: 1,
|
|
286
288
|
|
|
@@ -418,12 +420,28 @@
|
|
|
418
420
|
page: this.page
|
|
419
421
|
}
|
|
420
422
|
|
|
421
|
-
let filters = {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
423
|
+
let filters = {};
|
|
424
|
+
|
|
425
|
+
if(this.internalSort) {
|
|
426
|
+
|
|
427
|
+
filters = {
|
|
428
|
+
...params,
|
|
429
|
+
...formFilters,
|
|
430
|
+
...this.externalFilters,
|
|
431
|
+
...order,
|
|
432
|
+
...page
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
} else {
|
|
436
|
+
|
|
437
|
+
filters = {
|
|
438
|
+
...params,
|
|
439
|
+
...formFilters,
|
|
440
|
+
...order,
|
|
441
|
+
...this.externalFilters,
|
|
442
|
+
...page
|
|
443
|
+
}
|
|
444
|
+
|
|
427
445
|
}
|
|
428
446
|
|
|
429
447
|
return filters;
|
|
@@ -442,6 +460,9 @@
|
|
|
442
460
|
|
|
443
461
|
if(data.sortable == true) {
|
|
444
462
|
|
|
463
|
+
// Esto hace que se haga caso omiso a la ordenación de externalFilters
|
|
464
|
+
this.internalSort = true;
|
|
465
|
+
|
|
445
466
|
let column_id = data.id;
|
|
446
467
|
|
|
447
468
|
// Determinar la columan que va a ordenar los resultados
|