Open
Description
Describe the Bug
I've come across an issue with the multi-tenant plugin where the "Leave without saving" message appears when navigating away from page records when nothing has changed.
Link to the code that reproduces this issue
https://github.com/payloadcms/payload/tree/main/examples/multi-tenant
Reproduction Steps
Steps to reproduce
- Log in as super-admin (using [email protected] credentials)
- Do not select any tenant in the tenant selector
- Open any page record
- Notice that the tenant selector automatically updates to match the tenant assigned to the page
- Try to navigate away from the page without making any changes
- A "Leave without saving" prompt appears even though no changes were made
Expected behavior
Since no changes were made to the record, navigating away should happen without any prompt.
Actual behavior
The system prompts with a "Leave without saving" message even though no changes were made to the record.
Additional information
- This issue only occurs when initially loading the page without a tenant selected
- If a tenant is selected before opening a page record, the issue does not occur
Which area(s) are affected? (Select all that apply)
plugin: multi-tenant
Environment Info
- payload: 3.41.0
- @payloadcms/plugin-multi-tenant: 3.41.0