Material-table: Error while typing on input on new row, if onRowDataChange

Created on 3 Aug 2020  Â·  29Comments  Â·  Source: mbrn/material-table

Guidelines

  • Please include a demo of the issue/behavior/question you have

  • Please try to be as detailed as possible

  • You may fork one of the following starter templates if you would like:

Describe the bug
While typing on any one of the inputs on a new row (that displays on click of add icon), if the editComponent input includes onRowDataChange property, then TypeError: _this2.props.onBulkEditRowChanged is not a function is thrown.
This is because onBulkEditRowChanged function is not defined in a new row props.

To Reproduce
Steps to reproduce the behavior:

  1. Create a MaterialTable component
  2. Add editComponent for a column
  3. On column with editComponent, add onRowDataChange action
  4. On the browser, click on add row
  5. On the new row created, start typing on the column with onRowDataChange
  6. See error

Expected behavior
Normal behaviour as the other rows while updation, but in the context of new addition.

Screenshots
image
image
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: chrome
  • Version 84.0.4147.89 (Official Build) (64-bit)
bug

Most helpful comment

+1 - It does not seem to be working on the example page as well. https://material-table.com/#/docs/features/editable

Also, this seems to be an issue with the latest version of material-table (1.68). Seems to be working fine with 1.67.1.

All 29 comments

+1 - It does not seem to be working on the example page as well. https://material-table.com/#/docs/features/editable

Also, this seems to be an issue with the latest version of material-table (1.68). Seems to be working fine with 1.67.1.

Have similar issue.
Downgrade to previous version 1.67.1

Yes. The downgrade worked for me too.
Bug on version 1.68.0 release.

On Tue, 4 Aug 2020 at 6:39 PM, Yuri Kravcenko notifications@github.com
wrote:

Have similar issue.
Downgrade to previous version 1.67.1

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mbrn/material-table/issues/2269#issuecomment-668586212,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFRXJS6W6LHGN3ZGBIWKTS3R7ACBPANCNFSM4PTTQJMA
.

>

Regards,
Sindhuja Govindarajan.
Chennai, TN, India.

Got the same issue. Downgrade to 1.67.1 works

I currently use version 1.57.2 and the same thing happens

Started to experience that few minutes ago after editing the table once it keeps throw this exception.

Got the same issue. Downgrade to 1.67.1 works

Same.

Same issue, and downgrading to 1.67 I am having a bunch of warnings...

This is simply caused by passing this to the base input field. This should be removed from the spreaded props somewhere. {...props}. Can someone open a PR to extract that?

Same issue here

It works when I downgraded to 1.67.1.
Just be careful to remove the ^ in your package.json.
-> You should have: "material-table": "1.67.1", and not "material-table": "^1.67.1", _(it might install 1.68, the buggued version)_

Yes, could you please fix this on 1.68.0? Because on 1.67.1, there was another error, so I had to bump up to 1.68

Its not a bug but it was renamed to onBulkUpdate. So you need to use this.

The issue is still there with onRowAdd, examples (Custom Edit Component Example) given here https://material-table.com/#/docs/features/editable are not working either.
Error: TypeError: e.props.onBulkEditRowChanged is not a function

Downgraded to "material-table": "^1.67.1"

The basic add feature itself doesn’t work on the material-table doc
examples.

This is not just about a function rename as you say.

On Mon, 10 Aug 2020 at 12:11 AM, Domino987 notifications@github.com wrote:

Its not a bug but it was renamed to onBulkEditRowChanged. So you need to
use this.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mbrn/material-table/issues/2269#issuecomment-671086946,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFRXJS7S6HXJLP433A6SCPDR73UWVANCNFSM4PTTQJMA
.

>

Regards,
Sindhuja Govindarajan.
Chennai, TN, India.

@Domino987 ok, let's try adding a column in your examples page, when u start type text to column, table is crashed
https://material-table.com/#/docs/features/editable
image

@Domino987 ok, let's try adding a column in your examples page, when u start type text to column, table is crashed
https://material-table.com/#/docs/features/editable
image

@petr-like Literally right now encountered this issue, as the other dev friends said, downgrade to 1.67.1 and make sure in your package.json looks something like this:

"material-table": "1.67.1" not "material-table": "^1.67.1"

It worked for me instantly...

@Domino987 This is a bug indeed, it shouldn't be closed. Have a look for yourself at https://material-table.com/#/docs/features/editable:

  1. Open the console
  2. Expand "Editable example"
  3. Click on the add button
  4. Try writing anything in the "name" field. The UI becomes broken immediately and the following error appears:
TypeError: e.props.onBulkEditRowChanged is not a function. (In 'e.props.onBulkEditRowChanged(e.props.data,n)', 'e.props.onBulkEditRowChanged' is undefined)

I am having the same issue while running the codesandbox.io material-table example referenced in material-ui.com. Easily reproducible by simply clicking on the edit in sandbox example and attempting to add a new row. The error is thrown when typing in one of the input fields of the newly added row.

+1

"material-table": "1.67.1" solves this but v 1.67.1 doesn't support bulk edit.

You can check this thread https://github.com/mbrn/material-table/issues/2304 This implementation can fix the issue temporally

did it get solved? because im running "material-table": "^1.68.0" and i still get the error

did it get solved? because im running "material-table": "^1.68.0" and i still get the error

me too..., temporarily use 1.67.1

Seems not solved now, the official documentation's table still breaks if adding a new data. But why this issue is closed? It is not solved yet. 🤔

Hello @all, so this is fixed with 1.69.0 with the PR #2313 merged 9 days ago and released yesterday, as our release cycle is every Sunday. That's why I mentioned this issue in the corresponding PR and it was closed upon merge. The documentation still fails, because it is always a few version behind the current version to get all the new changes into the docs. I hoped you all would be a little bit more patient for fixes, since we are all full time employed and do this for free.

Unfortunately this caused a production bug for me ... a combination of bad timing (the release came just a few days before prod release), optimistic attitude (get latest of most libraries while we can afford to, and little to no acceptance testing on new releases of the libs we use), and apparently lack of unit tests on material-table's side?

On my end I've now fixed the release to 1.69.0 and will be more careful in accepting updates.

Generally a very nice library though, don't get me wrong :).

Thanks and keep it up,
Ced

Yes we do not have any tests as right now, but we started with the rewritte which will include tests and more. So this should not happen in the future.

1.69.0 fixed this issue but this version produces another bug with onRowUpdate: the entire page completely freezes after some updates (4-5), see https://github.com/mbrn/material-table/issues/2400 for the similar issue with delete action.
1.67.1 works stable with update action.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slevy85 picture slevy85  Â·  3Comments

balibou picture balibou  Â·  3Comments

KKrisu picture KKrisu  Â·  3Comments

jlgreene2 picture jlgreene2  Â·  3Comments

revskill10 picture revskill10  Â·  3Comments