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 @@
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.
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 @@
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.