fix(plugin-multi-tenant): unnecessary modal appearing (#12854)

Fixes #12826 

Leave without saving was being triggered when no changes were made to
the tenant. This should only happen if the value in form state differs
from that of the selected tenant, i.e. after changing tenants.

Adds tenant selector syncing so the selector updates when a tenant is
added or the name is edited.

Also adds E2E for most multi-tenant admin functionality. 

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1210562742356842
This commit is contained in:
Jarrod Flesch
2025-06-27 16:30:13 -04:00
committed by GitHub
parent 9f6030641a
commit 16f5538e12
14 changed files with 745 additions and 107 deletions

View File

@@ -315,7 +315,8 @@ import type { Field } from 'payload'
export const MyField: Field = {
type: 'text',
name: 'myField',
validate: (value, {req: { t }}) => Boolean(value) || t('validation:required'), // highlight-line
validate: (value, { req: { t } }) =>
Boolean(value) || t('validation:required'), // highlight-line
}
```