Skip to content

fix(richtext-lexical): preserve tenant filter for enabled collections - #17802

Open
Shweta-singh24 wants to merge 1 commit into
payloadcms:mainfrom
Shweta-singh24:fix/17765-lexical-tenant-filter
Open

fix(richtext-lexical): preserve tenant filter for enabled collections#17802
Shweta-singh24 wants to merge 1 commit into
payloadcms:mainfrom
Shweta-singh24:fix/17765-lexical-tenant-filter

Conversation

@Shweta-singh24

Copy link
Copy Markdown

Summary

Fixes #17765.

This preserves filterOptions for Lexical's internal link relationship field when LinkFeature is configured with enabledCollections or disabledCollections.

Previously, the relationship field set filterOptions to null whenever either option was provided, which bypassed admin.baseFilter / admin.baseListFilter and caused the multi-tenant plugin to lose tenant scoping in the internal link picker.

Changes

  • Preserve filterOptions regardless of enabledCollections / disabledCollections
  • Continue respecting admin.hidden
  • Continue applying admin.baseFilter / admin.baseListFilter
  • Add an isolated regression test covering:
    • plain relationship field
    • default LinkFeature
    • LinkFeature({ enabledCollections })

Testing

export PAYLOAD_DATABASE=sqlite
pnpm test:int lexical-link-picker-tenant

Result: 3 integration tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lexical internal link picker is not tenant filtered when LinkFeature has enabledCollections

1 participant