Open meditto opened 3 months ago
Hi @meditto, is discardConfirmation working in your app? I don't see a popup on discard click and the function just runs. I'm trying to figure out if it's related to this issue or I'm doing something wrong.
Ps. I also see this error when trying to leave the page. Also browser back button does not prevent leaving. I think there is an open issue related to the back button.
Same here,
Using the saveBar.leaveConfirmation()
the savebar just shakes and errors are thrown in the console.
Uncaught Error: Minified React error #301; visit https://reactjs.org/docs/error-decoder.html?invariant=301 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at Mv (render-common-DOprh8udKYgJ.js:23:20194)
at Uv (render-common-DOprh8udKYgJ.js:25:3138)
at sN (render-common-DOprh8udKYgJ.js:25:45157)
at aN (render-common-DOprh8udKYgJ.js:25:40069)
at JK (render-common-DOprh8udKYgJ.js:25:39997)
at Y5 (render-common-DOprh8udKYgJ.js:25:39850)
at J9 (render-common-DOprh8udKYgJ.js:25:34883)
at _ (render-common-DOprh8udKYgJ.js:10:1599)
at O (render-common-DOprh8udKYgJ.js:10:1962)
at Hv.Ii.<computed> (polyfills-_0C5sq0bp6zl.js:2:13226)
React Error
Too many re-renders. React limits the number of renders to prevent an infinite loop.
https://react.dev/errors/301?invariant=301
Yes, I think they removed the discard confirmation modal
im having a similar issue! After the last update the modal that used to popped up is not working anymore.
await shopify.saveBar.leaveConfirmation();
Using the saveBar.leaveConfirmation() the savebar just shakes and errors are thrown in the console.
I think this may be intentional (the shaking part, not the console error). If you create a new product in the Shopify admin and try to navigate away with unsaved changes, the savebar shakes exactly as you described. So, I'm thinking it must be a new Shopify-official UI pattern.
Are there any official docs how leaveConfirmation should work? Or a changelog on what updates were made?
Experiencing this issue too while trying to block the closing of a max modal when there are unsaved changes
Any updates on this?
This problem still exists, if you apply for Built for Shopify, Shopify requires that you use SaveBar, but there are so many problems and no one is trying to solve them!
we need it to be fixed!
Describe the bug
I'm encountering an issue with the shopify.saveBar.leaveConfirmation() function after a recent update to the savebar. The error message points to a minified React erro:
To Reproduce
Steps to reproduce the behaviour:
1- Call the shopify.saveBar.leaveConfirmation() function in your code. 2- Observe the console for the error message.
Expected behaviour
a confirmation modal should appear after calling shopify.saveBar.leaveConfirmation()
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge-react
@^4.1.2
@shopify/polaris
@^12.0.0
Platform
Additional context
The app is created using Shopify App Template - Remix