Thinkmill / Thinkmill/keystatic
Feature: relationship filtering
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 159
- Avg merge
- 21h 41m
- Merged PRs (30d)
- 2
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the relationship field API and the collection type definitions, then trace how relationship entries are currently typed. Done means relationship fields accept a filter and infer compatible types for both entry and collectionEntry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100