Skip to content

Commit

Permalink
Merge pull request #388 from lawrenceching/main_editable_events
Browse files Browse the repository at this point in the history
#387 describe "editable" events in document and demos
  • Loading branch information
johanneswilm authored Aug 21, 2024
2 parents ec0f752 + f25c70b commit 1953aef
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/demos/15-editing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ <h2>Editing</h2>
}
]
})

table.on('editable.save.cell', (newValue, oldValue, row, column) => {

Check failure on line 805 in docs/demos/15-editing/index.html

View workflow job for this annotation

GitHub Actions / lint

Strings must use doublequote
console.log(`cell is saved: newValue=${newValue}, oldValue=${oldValue}, row=${row}, column=${column}`)
})
}
resetTable()
document.getElementById("modal").addEventListener("input", _event => {
Expand Down
17 changes: 16 additions & 1 deletion docs/documentation/Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,19 @@ dataTable.on('datatable.sort', function(column, direction) {
Fires when the `.update()` method is called.

### `datatable.update:before`
Fires before the `.update()` method is called.
Fires before the `.update()` method is called.

### `editable.init`
Fires when the editor is initialized.

### `editable.save.cell`
Fires when the cell is saved (even when the value is not actually updated).

### `editable.save.row`
Fires when the row is saved.

### `editable.context.open`
Fires when the context menu is opened.

### `editable.context.close`
Fires when the context menu is closed.

0 comments on commit 1953aef

Please sign in to comment.