wacom 20.0.16 → 20.0.17
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/fesm2022/wacom.mjs +21 -0
- package/fesm2022/wacom.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/package.json +1 -1
package/fesm2022/wacom.mjs
CHANGED
|
@@ -1341,6 +1341,9 @@ class CrudComponent {
|
|
|
1341
1341
|
allowUrl() {
|
|
1342
1342
|
return true;
|
|
1343
1343
|
}
|
|
1344
|
+
allowSort() {
|
|
1345
|
+
return false;
|
|
1346
|
+
}
|
|
1344
1347
|
/**
|
|
1345
1348
|
* Funciton which prepare get crud options.
|
|
1346
1349
|
*/
|
|
@@ -1445,6 +1448,24 @@ class CrudComponent {
|
|
|
1445
1448
|
},
|
|
1446
1449
|
}
|
|
1447
1450
|
: null,
|
|
1451
|
+
this.allowSort()
|
|
1452
|
+
? {
|
|
1453
|
+
icon: 'arrow_upward',
|
|
1454
|
+
click: (doc) => {
|
|
1455
|
+
const index = this.documents.findIndex((d) => d._id === doc._id);
|
|
1456
|
+
if (index) {
|
|
1457
|
+
this.documents.splice(index, 1);
|
|
1458
|
+
this.documents.splice(index - 1, 0, doc);
|
|
1459
|
+
}
|
|
1460
|
+
for (let i = 0; i < this.documents.length; i++) {
|
|
1461
|
+
if (this.documents[i].order !== i) {
|
|
1462
|
+
this.documents[i].order = i;
|
|
1463
|
+
this.service.update(this.documents[i]);
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
}
|
|
1468
|
+
: null,
|
|
1448
1469
|
],
|
|
1449
1470
|
headerButtons: [
|
|
1450
1471
|
this.allowCreate()
|