Skip to content
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
6 changes: 4 additions & 2 deletions ipydatagrid/datagrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,17 @@ def __init__(self, dataframe, index_name=None, **kwargs):
def __handle_custom_msg(self, _, content, buffers): # noqa: U101,U100
if content["event_type"] == "cell-changed":
row = content["row"]
column = content["column"]
column = self._column_index_to_name(
self._data, content["column_index"]
)
value = content["value"]
# update data on kernel
self._data["data"].loc[row, column] = value
# notify python listeners
self._cell_change_handlers(
{
"row": row,
"column": content["column"],
"column": column,
"column_index": content["column_index"],
"value": value,
}
Expand Down
1 change: 0 additions & 1 deletion js/datagrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ export class DataGridModel extends DOMWidgetModel {
event_type: 'cell-changed',
region: msg.region,
row: msg.row,
column: msg.column,
column_index: msg.columnIndex,
value: msg.value,
},
Expand Down