Material-table: Save action triggered with invalid data on Enter key pressed

Created on 4 Aug 2020  路  3Comments  路  Source: mbrn/material-table

Describe the bug
On Editable feature, if some column has the validate property and you focus on some input and press Enter, the save action is triggered (onRowAdd, onRowUpdate) even if the row has invalid data.

To Reproduce

  1. Go to https://codesandbox.io/s/cranky-morse-eo9gf
  2. Click on "Add" row icon.
  3. Click on some input.
  4. Press 'Enter' key.
  5. The row was added with empty (invalid) data.

Expected behavior
Pressing enter should not trigger save action with invalid data.

bug

All 3 comments

Having this same issue. Is there a way to work around or fix this?

Any update on it ?

I have a PR proposal that fixes that bug. If it is that urgent, you may checkout my branch and build your own version with my code. @mrjdavidfg @jscotty723 @awesomeToan

@mbrn do you have time to review my PR ?

Was this page helpful?
0 / 5 - 0 ratings