payload icon indicating copy to clipboard operation
payload copied to clipboard

using filterOptions on relationship field can cause infinite loop

Open felskov opened this issue 2 years ago • 1 comments

Link to reproduction

No response

Describe the Bug

When adding filterOptions to a polymorphic relationship field, we're experiencing infinite loops in the frontend when doing any interaction with the content (ie. doesn't matter if we type characters inside a richtext field or anything else, as soon as content is updated the application enters an infinite loop).

To Reproduce

  1. Create a relationship field with multiple collections
  2. Add filterOptions callback to the field on certain collections
  3. Try to edit a document
  4. The frontend UI will enter an infinite loop

Payload Version

2.9.0

Adapters and Plugins

db-mongodb, bundler-webpack, richtext-slate

felskov avatar Feb 08 '24 09:02 felskov

I'm currently experiencing this issue. Payload v. 2.20.0

akhrarovsaid avatar Jun 18 '24 05:06 akhrarovsaid

This issue was automatically closed due to lack of activity. If this issue is still relevant against the latest codebase, please create a new issue.

github-actions[bot] avatar Dec 06 '24 15:12 github-actions[bot]

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Dec 08 '24 04:12 github-actions[bot]