Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#387 describe "editable" events in document and demos #388

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
}
]
})

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