classcard-ui 0.2.187 → 0.2.188

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.187",
3
+ "version": "0.2.188",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -299,23 +299,22 @@ export default {
299
299
  },
300
300
  // array of rows after drag and drop
301
301
  rearrange(oldIndex, newIndex) {
302
- var reorderedArray = [];
303
- this.rows.forEach(function (row) {
304
- reorderedArray.push({ oldID: row.id });
305
- });
302
+ // var reorderedArray = [];
303
+ // this.rows.forEach(function (row) {
304
+ // reorderedArray.push({ oldSortOrder: row.id });
305
+ // });
306
306
  const movedItem = this.rows.find((item, index) => index === oldIndex);
307
307
  const remainingItems = this.rows.filter((item, index) => index !== oldIndex);
308
-
309
308
  const reorderedItems = [
310
309
  ...remainingItems.slice(0, newIndex),
311
310
  movedItem,
312
311
  ...remainingItems.slice(newIndex),
313
312
  ];
314
- reorderedItems.forEach(function (row, index) {
315
- reorderedArray[index].newID = row.id;
316
- });
317
- this.$emit('reordered', reorderedArray);
318
- return reorderedArray;
313
+ // reorderedItems.forEach(function (row, index) {
314
+ // reorderedArray[index].newSortOrder = row.id;
315
+ // });
316
+ this.$emit('reordered', reorderedItems);
317
+ return reorderedItems;
319
318
  },
320
319
  // listing functions
321
320
  sortChange(params) {