Skip to content

onEditingRowSave: values parameter is empty after field edit #1464

Open

Description

@markus-albis

material-react-table version

V3

react & react-dom versions

V18

Describe the bug and the steps to reproduce it

Mode: "row" editing mode
Prop name: onEditingRowSave
Type: ({ exitEditingMode, row, table, values}) => Promise | void

I try to use the row editing mode to edit and update records. After performing some edits and clicking the Save icon button of the row, the onEditingRowSave returns an empty values parameter. Interesting enough, if I don't edit/change any fields and press save, the values parameter returns the original fields.

In "modal" mode, onEditingRowSave works as expected and modified field values are returned

Minimal, Reproducible Example - (Optional, but Recommended)

        onEditingRowSave: ({ table, values }) => {
            console.log('Returned values:', values);
            //save data to api
            table.setEditingRow(null); //exit editing mode
        },

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions