decaporg / decaporg/decap-cms

Filter property for relation widget

Open
#3,816 3 comments 3 reactions 0 assignees View on GitHub
area: extensions/widgets type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Is your feature request related to a problem? Please describe.**

Sometimes I don't want the full list of entries listed in a relation widget, eg. I don't want to allow the author to select posts with a draft flag set to `true`. As such it would be nice to add a `filter` property to the relation widget that would allow me to filter selectable options in the relation widget.

**Describe the solution you'd like**

Add a `filter` property to the relation widget that allows filtering of selectable options.
The filter syntax should be similar or the same as #3741.

**Describe alternatives you've considered**

**Additional context**

I already have a working version which still needs a bit of refactoring and then I'll open a PR tomorrow. I just want to collect additional feedback first.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.