keystatic icon indicating copy to clipboard operation
keystatic copied to clipboard

Feature: relationship filtering

Open florian-lefebvre opened this issue 2 years ago • 0 comments

Currently, we can add relationship between 2 collections, for any entry.

It would be great to allow applying filters, for instance:

fields.relationship({ label: "Category", collection: "categories", filter: (entry, collectionEntry) => entry.locale === collectionEntry.locale })

To achieve this, I think types from collections must be properly passed to each other in order to type properly collectionEntry (as well as collection)

florian-lefebvre avatar Jun 16 '23 15:06 florian-lefebvre