Shopify / ui-extensions

MIT License
248 stars 35 forks source link

Admin block stale data when navigating between orders #2093

Open patryk-smc opened 2 weeks ago

patryk-smc commented 2 weeks ago

We use admin.order-details.block.render with API 2024-04 and noticed that navigating between orders using the Next/Previous buttons in the top right corner of the order details page causes the Admin block to show stale data from previous orders. Only refreshing the browser helps.

We grab orderId like this

  const { i18n, data } = useApi("admin.order-details.block.render")

  const orderId = data.selected[0].id

and that ID is always the same, till the full browser refresh.

This is really confusing for the merchants, as they see the data that do not belong to the order.