payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
27.76k stars 1.72k forks source link

fix(ui): client side doc data not updating after save #9340

Closed JarrodMFlesch closed 3 days ago

JarrodMFlesch commented 3 days ago

What?

When a document is saved the data from useDocumentInfo was stale.

Why?

Previously we would refresh the entire document by calling the form-state endpoint, we no longer do that.

How?

Adds a new variable accessible from useDocumentInfo, savedDocumentData, that is updated when the document is successfully saved and defaults to initialData.

github-actions[bot] commented 2 days ago

🚀 This is included in version v3.0.1