Cascading choices from EntityReference #309
sebaschartrand
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Is it possible to filter an EntityReference?
type Category = {
name : {
fr : string,
en : string
} ;
}
type Subcategory = {
category : EntityReference ;
name : {
fr : string,
en : string
} ;
}
const productSchema = buildSchema({
name : "Product",
properties : {
category: {
title: "Category",
dataType : "reference",
path : "categories",
validation : { required : true }
},
subcategory : {
title : "Subcategory",
dataType : "reference",
path : "subcategories"
},
When I create a product, I would like the subcategories to be filtered by the category selection beforehand.
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions