Refactor Datatable doc and api-gen

pull/1643/head
mertsincan 2021-10-04 11:08:47 +03:00
parent 5aa7ee1cc5
commit 1c142f83a6
2 changed files with 61 additions and 25 deletions

View File

@ -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",
@ -836,30 +851,9 @@ const DataTableEvents = [
description: "Row data to edit."
},
{
name: "event.field",
type: "string",
description: "Field name of the row data."
},
{
name: "event.index",
type: "number",
description: "Index of the row data to edit."
}
]
},
{
name: "cell-edit-save",
description: "Callback to invoke when cell edit is saved.",
arguments: [
{
name: "event.originalEvent",
name: "event.newData",
type: "object",
description: "Browser event"
},
{
name: "event.data",
type: "object",
description: "Row data to edit."
description: "New row data after editing."
},
{
name: "event.field",
@ -874,8 +868,8 @@ const DataTableEvents = [
]
},
{
name: "cell-edit-cancel",
description: "Callback to invoke when cell edit is cancelled.",
name: "row-edit-save",
description: "Callback to invoke when row edit is saved.",
arguments: [
{
name: "event.originalEvent",
@ -887,6 +881,42 @@ 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",
description: "Field name of the row data."
},
{
name: "event.index",
type: "number",
description: "Index of the row data to edit."
}
]
},
{
name: "row-edit-cancel",
description: "Callback to invoke when row edit is cancelled.",
arguments: [
{
name: "event.originalEvent",
type: "object",
description: "Browser event"
},
{
name: "event.data",
type: "object",
description: "Row data to edit."
},
{
name: "event.newData",
type: "object",
description: "New row data after editing."
},
{
name: "event.field",
type: "string",

View File

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