Fixed lints

pull/104/head
cagataycivici 2019-10-17 17:17:27 +03:00
parent 772eb9e819
commit cf556c5d3d
4 changed files with 20 additions and 27 deletions

View File

@ -15,15 +15,15 @@ export default {
},
data() {
return {
_rows: null
children: null
};
},
mounted() {
this._rows = this.$children;
this.children = this.$children;
},
computed: {
rows() {
return this._rows;
return this.children;
}
}
}

View File

@ -1155,8 +1155,6 @@ export default {
event.currentTarget.draggable = false;
},
onRowDrop(event) {
let rowElement = event.currentTarget;
if (this.droppedRowIndex != null) {
let dropIndex = (this.draggedRowIndex > this.droppedRowIndex) ? this.droppedRowIndex : (this.droppedRowIndex === 0) ? 0 : this.droppedRowIndex - 1;
let processedData = [...this.processedData];
@ -1207,7 +1205,6 @@ export default {
})];
}
}
return columns;
},
headerColumnGroup() {

View File

@ -246,8 +246,8 @@ export default {
</tr>
<tr>
<td>reorderableColumn</td>
<td>string</td>
<td>null</td>
<td>boolean</td>
<td>true</td>
<td>Defines if the column itself can be reordered with dragging.</td>
</tr>
</tbody>
@ -630,8 +630,7 @@ data() {
</CodeHighlight>
<h3>Column Reorder</h3>
<p>Columns can be reordered using drag drop by setting the <i>reorderableColumns</i> to true. <i>column-reorder</i> is a callback that is invoked when a column is reordered.
DataTable keeps the column order state internally using keys that identifies a column using the field property. If the column has no field, use columnKey instead.</p>
<p>Columns can be reordered using drag drop by setting the <i>reorderableColumns</i> to true. <i>column-reorder</i> is a callback that is invoked when a column is reordered. DataTable keeps the column order state internally using keys that identifies a column using the field property. If the column has no field, use columnKey instead.</p>
<CodeHighlight>
<template v-pre>
&lt;DataTable :value="cars" :reorderableColumns="true"&gt;
@ -644,8 +643,7 @@ data() {
</CodeHighlight>
<h3>Row Reorder</h3>
<p>Data can be reordered using drag drop by adding a reorder column that will display an icon as a drag handle.
"row-reorder" is a mandatory callback that is invoked when a column is reordered, use this event to update the new order. Note that the reorder icon can be customized using <i>rowReorderIcon</i> of the column component.</p>
<p>Data can be reordered using drag drop by adding a reorder column that will display an icon as a drag handle. "row-reorder" is a mandatory callback that is invoked when a column is reordered, use this event to update the new order. Note that the reorder icon can be customized using <i>rowReorderIcon</i> of the column component.</p>
<CodeHighlight>
<template v-pre>
&lt;DataTable :value="cars" @row-reorder="onRowReorder"&gt;

View File

@ -72,7 +72,6 @@ export default {
<script>
import CarService from '../../service/CarService';
import DataTableSubMenu from './DataTableSubMenu';
import DataTableDoc from './DataTableDoc';
export default {
data() {
@ -96,7 +95,7 @@ export default {
this.carService.getCarsSmall().then(data => this.cars = data);
},
methods: {
onColReorder(event) {
onColReorder() {
this.$toast.add({severity:'success', summary: 'Column Reordered', life: 3000});
},
onRowReorder(event) {
@ -105,7 +104,6 @@ export default {
}
},
components: {
'DataTableDoc': DataTableDoc,
'DataTableSubMenu': DataTableSubMenu
}
}