For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hi,
I'm developing an Admin UI Action Extension that will create and add a specific product to the Draft Order being edited. All is working fine - the product is created and added to the draft order - but the problem is that the Draft order doesn't update its items after the extension dialog closes. I need to manually refresh the Admin Draft Order Detail page so that the new item appears. Is there a way to refresh the Draft Order when finishing the extension action?
Since the extension runs in a sandbox it seems that even doing a location.reload() doesn't work... Any Ideias would be appreciated. Thanks!
Thanks for posting this. I had the same problem.
You can track the github issue progress here:
https://github.com/Shopify/ui-extensions/issues/2234
Here's a similar post with some additional info:
Oh and also the only workaround I found was to use a <Link> element so the user can click to manually reload the page themselves. For now links are the only way to navigate pages as far as I can tell. Let me know if you find a better solution though. Hopefully Shopify will add the navigation api to Admin Actions and expand it's functionality beyond navigation between blocks and actions.
Thanks Friendscottn! I was starting to think that I was the only one with this problem. And thanks for the <Link> suggestion, I might explore it as it can improve a bit the UX.