question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[3.11] SaveButton inside FormWithRedirect component throws error

See original GitHub issue

The custom form shown here: https://marmelab.com/react-admin/CreateEdit.html#custom-form-component No longer works with react-admin v3.11

I copy-paste the above sample as the Post form in the following sandbox: https://codesandbox.io/s/charming-mahavira-kuphi?file=/src/posts/PostCreate.js

  1. Create a new Post
  2. You get the error TypeError: Cannot read property 'save' of undefined

Environment

  • React-admin version: 3.11
  • Last version that did not exhibit the issue (if applicable): 3.10.4
  • React version: 17.0.1
  • Browser: Google Chrome latest

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
WiXSLcommented, Jan 4, 2021

#5738 has just been merged, which solves the problem (At least the one I reported) at least until the next mayor release. By then it would be my responsibility to upgrade my code to use SaveContext of course.

1reaction
alextaymxcommented, Jan 3, 2021

@fzaninotto , the DEMO examples are not updated to this latest changes

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-admin TypeError: Cannot read property 'save' of undefined
But i have an error TypeError: Cannot read property 'save' of undefined. ... the error came from SaveButton component so might as well...
Read more >
The SaveButton Component - React-admin - Marmelab
The <SaveButton> component is a button that is used to submit a form. ... For instance, to display two save buttons in a...
Read more >
react-admin: Versions - Openbase
Fix <ArrayInput> throws an error when providing a helperText (#8276) (slax57) ... [Doc] Fix <SaveButton> is documented in two different chapters (#7742) ...
Read more >
React Admin Modal: Create Record Without Leaving Page
It plays a role in getting our new User rendered as part of the list of User options after we “successfully” create the...
Read more >
marmelab/react-admin release history - changelogs.md
Fix <ArrayInput> throws an error when providing a helperText (#8276) (slax57) ... [Doc] Fix <SaveButton> is documented in two different chapters (#7742) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found