From 319a1bc67abc79fb8a128eed7e4e783a39202d64 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Fri, 1 Nov 2019 11:35:39 +0300 Subject: [PATCH] Lint fixes --- src/components/datatable/BodyCell.vue | 16 ++++++++-------- src/components/datatable/DataTable.vue | 6 +++--- src/components/dialog/Dialog.vue | 2 +- src/views/datatable/DataTableDoc.vue | 10 +++++----- src/views/datatable/DataTableEditDemo.vue | 6 +++--- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/datatable/BodyCell.vue b/src/components/datatable/BodyCell.vue index 531b1026e..fc70191b5 100644 --- a/src/components/datatable/BodyCell.vue +++ b/src/components/datatable/BodyCell.vue @@ -115,7 +115,7 @@ export default { this.completeEdit(event, 'outside'); } }; - + document.addEventListener('click', this.documentEditListener); } }, @@ -141,17 +141,17 @@ export default { }, completeEdit(event, type) { let completeEvent = { - originalEvent: event, - data: this.rowData, - field: this.column.field, - index: this.index, - type: type, + originalEvent: event, + data: this.rowData, + field: this.column.field, + index: this.index, + type: type, defaultPrevented: false, preventDefault: function() { this.defaultPrevented = true; } }; - + this.$emit('cell-edit-complete', completeEvent); if (!completeEvent.defaultPrevented) { @@ -164,7 +164,7 @@ export default { case 13: this.completeEdit(event, 'enter'); break; - + case 27: this.switchCellToViewMode(); this.$emit('cell-edit-cancel', {originalEvent: event, data: this.rowData, field: this.column.field, index: this.index}); diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index f50fb703c..bf60e91e0 100644 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -71,9 +71,9 @@ @@ -1609,7 +1609,7 @@ export default { let _editingRows = this.editingRows ? [...this.editingRows] : []; _editingRows.push(event.data); this.$emit('update:editingRows', _editingRows); - this.$emit('row-edit-init', event); + this.$emit('row-edit-init', event); }, onRowEditSave(event) { let _editingRows = [...this.editingRows]; diff --git a/src/components/dialog/Dialog.vue b/src/components/dialog/Dialog.vue index 999d3607e..818897d68 100644 --- a/src/components/dialog/Dialog.vue +++ b/src/components/dialog/Dialog.vue @@ -105,7 +105,7 @@ export default { onKeyDown(event) { if (event.which === 9) { event.preventDefault(); - + let focusableElements = DomHandler.getFocusableElements(this.$refs.container); if (focusableElements && focusableElements.length > 0) { diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue index fbcb28452..76f199658 100644 --- a/src/views/datatable/DataTableDoc.vue +++ b/src/views/datatable/DataTableDoc.vue @@ -690,11 +690,11 @@ export default {

InCell Editing

-

In cell editing provides a rapid and user friendly way to manipulate the data. The datatable provides a flexible API +

In cell editing provides a rapid and user friendly way to manipulate the data. The datatable provides a flexible API so that the editing behavior is implemented by the page author whether it utilizes v-model or vuex.

- -

Individuals cell editing is configured by setting the editMode to "cell" and defining editors with the "editor" template. The content of the + +

Individuals cell editing is configured by setting the editMode to "cell" and defining editors with the "editor" template. The content of the editor defines how the editing is implemented, below example demonstrates two cases. In the first example, simple v-model editors are utilized. This is pretty straightforward in most cases. On the other hand, second example is more advanced to consider validations and ability to revert values with the escape key.

@@ -784,7 +784,7 @@ export default { if (!this.editingCellRows[event.index]) { return; } - + const editingCellValue = this.editingCellRows[event.index][event.field]; switch (event.field) { @@ -886,7 +886,7 @@ export default { this.carService.getCarsSmall().then(data => this.cars = data); } } - +

Column Resize

Columns can be resized using drag drop by setting the resizableColumns to true. There are two resize modes; "fit" and "expand". Fit is the default one and the overall table width does not change when a column is resized. diff --git a/src/views/datatable/DataTableEditDemo.vue b/src/views/datatable/DataTableEditDemo.vue index b54a853c8..e38b97755 100644 --- a/src/views/datatable/DataTableEditDemo.vue +++ b/src/views/datatable/DataTableEditDemo.vue @@ -5,7 +5,7 @@

DataTable - InCell Edit

-

In cell editing provides a rapid and user friendly way to manipulate the data. The datatable provides a flexible API +

In cell editing provides a rapid and user friendly way to manipulate the data. The datatable provides a flexible API so that the editing behavior is implemented by the page author whether it utilizes v-model or vuex.

@@ -194,7 +194,7 @@ export default { if (!this.editingCellRows[event.index]) { return; } - + const editingCellValue = this.editingCellRows[event.index][event.field]; switch (event.field) { @@ -299,7 +299,7 @@ export default { if (!this.editingCellRows[event.index]) { return; } - + const editingCellValue = this.editingCellRows[event.index][event.field]; switch (event.field) {