-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning for unsaved changes when updating a <CheckboxGroupInput> #4969
Comments
Experienced the same issue but on 3.6.0, react 16.13.1, Chrome. const MyNotification = props => <ToastContainer
position="bottom-center"
autoClose={5000}
hideProgressBar={false}
newestOnTop
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable={false}
pauseOnHover
closeButton={null}
limit={3}
/>;
const MyLayout = (props) => <Layout {...props} notification={MyNotification} menu={withRouter(connect(mapStateToProps)(MyMenu))} />; This broke the undo button and resulted in what OP described. Edit: |
I don't see the relationship between the main issue and your comment. The main issue appears in a totally normal application, without custom Notification. Also, the reason why the "cache -> send" event is triggered by the Notification is because the Notification can delay the event (if you hover on the Notification, it stays displayed longer). That being said, there may be a way to store the send event logic elsewhere and delay it in case the user hovers on the Notification. I suggest you open another issue for that. |
I'm sorry if my post brought confusing. The "Some of your changes weren't saved. Are you sure you want to ignore them?" error happend for me because the save event never fired. If you don't use a custom notification bar I don't see a reason why it shouldn't work and I'm unable to help on this topic. (sorry) Interesting thought. I don't think that the delay should play a major role on the choice of using this notification bar or an other since Toast also provides this feature. In my situation, because I removed the notification bar, the save event attached to the default notification bar did never trigger. It might be completely unrelated. But you can check for example if the save method is fired when clicking the button? In my understanding the undo button has a timer on it which fits more in my image. Maybe your save button redirects you to a different page before actual saving onclick? Does your console provide you any logs? I might open a ticket for my own issue with the navigation bar, however I do have a workaround now. |
This is caused by a react-final-form bug: final-form/react-final-form#365. Checking if we can fix it in react-admin. |
No, we can't. The fix suggested in the linked issue doesn't work on the |
Actually the issue does not happen because of the
If you comment the |
What you were expecting:
In the simple example, edit a Post, update the Notification recipients and save, then get to the list.
What happened instead:
After clicking on the Save button, an alert shows up and says:
Steps to reproduce:
I cannot reproduce the problem in the CodeSandbox, but I get it when running the simple example with
make run
on Master.I can only reproducing when updating the Notification Recipients, not any other field.
Environment
The text was updated successfully, but these errors were encountered: