Skip to content

Make it easier to access the updated item in mo.ui.data_editor when it changes #7662

@ruuffo

Description

@ruuffo

Description

Hi,

I was playing around with mo.ui.data_editor, and I wanted to get the changed row's ID (or index) and column name, as well as the new value, when a cell value was changed, so that I could update it in an SQL database, but I couldn't find a simple way to do this. I thought it might be a good feature to suggest.

Suggested solution

Instead of passing the whole dataframe in parameter of the callable object in the on_change parameter (which is already accesible via mo.ui.data_editor().value attribute), it could be nice to pass the row index (or a row_id defined on the initialization of the mo.ui.data_editor) the column in which the change happened and the new value.

Are you willing to submit a PR?

  • Yes

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions