Skip to content

Commit

Permalink
Refactor Datatable doc and api-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Oct 4, 2021
1 parent 5aa7ee1 commit 1c142f8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
38 changes: 34 additions & 4 deletions api-generator/components/datatable.js
Expand Up @@ -777,6 +777,21 @@ const DataTableEvents = [
type: "object",
description: "Row data to edit."
},
{
name: "event.newData",
type: "object",
description: "New row data after editing."
},
{
name: "event.value",
type: "object",
description: "Field value of row data to edit."
},
{
name: "event.newValue",
type: "object",
description: "Field value of new row data after editing"
},
{
name: "event.field",
type: "string",
Expand Down Expand Up @@ -835,6 +850,11 @@ const DataTableEvents = [
type: "object",
description: "Row data to edit."
},
{
name: "event.newData",
type: "object",
description: "New row data after editing."
},
{
name: "event.field",
type: "string",
Expand All @@ -848,8 +868,8 @@ const DataTableEvents = [
]
},
{
name: "cell-edit-save",
description: "Callback to invoke when cell edit is saved.",
name: "row-edit-save",
description: "Callback to invoke when row edit is saved.",
arguments: [
{
name: "event.originalEvent",
Expand All @@ -861,6 +881,11 @@ const DataTableEvents = [
type: "object",
description: "Row data to edit."
},
{
name: "event.newData",
type: "object",
description: "New row data after editing."
},
{
name: "event.field",
type: "string",
Expand All @@ -874,8 +899,8 @@ const DataTableEvents = [
]
},
{
name: "cell-edit-cancel",
description: "Callback to invoke when cell edit is cancelled.",
name: "row-edit-cancel",
description: "Callback to invoke when row edit is cancelled.",
arguments: [
{
name: "event.originalEvent",
Expand All @@ -887,6 +912,11 @@ const DataTableEvents = [
type: "object",
description: "Row data to edit."
},
{
name: "event.newData",
type: "object",
description: "New row data after editing."
},
{
name: "event.field",
type: "string",
Expand Down
6 changes: 6 additions & 0 deletions src/views/datatable/DataTableDoc.vue
Expand Up @@ -2352,6 +2352,9 @@ export default {
<td>cell-edit-complete</td>
<td>event.originalEvent: Browser event<br />
event.data: Row data to edit. <br />
event.newData: New row data after editing. <br />
event.value: Field value of row data to edit. <br />
event.newValue: Field value of new row data after editing. <br />
event.field: Field name of the row data. <br />
event.index: Index of the row data to edit. <br />
event.type: Type of completion such as "enter", "outside" or "tab". <br /></td>
Expand All @@ -2369,6 +2372,7 @@ export default {
<td>row-edit-init</td>
<td>event.originalEvent: Browser event<br />
event.data: Row data to edit. <br />
event.newData: New row data after editing. <br />
event.field: Field name of the row data. <br />
event.index: Index of the row data to edit. <br /></td>
<td>Callback to invoke when row edit is initiated.</td>
Expand All @@ -2377,6 +2381,7 @@ export default {
<td>row-edit-save</td>
<td>event.originalEvent: Browser event<br />
event.data: Row data to edit. <br />
event.newData: New row data after editing. <br />
event.field: Field name of the row data. <br />
event.index: Index of the row data to edit. <br /></td>
<td>Callback to invoke when row edit is saved.</td>
Expand All @@ -2385,6 +2390,7 @@ export default {
<td>row-edit-cancel</td>
<td>event.originalEvent: Browser event<br />
event.data: Row data to edit. <br />
event.newData: New row data after editing. <br />
event.field: Field name of the row data. <br />
event.index: Index of the row data to edit. <br /></td>
<td>Callback to invoke when row edit is cancelled.</td>
Expand Down

0 comments on commit 1c142f8

Please sign in to comment.