How to create filtered picker field

Hi!

I need to create a filtered picker, I have category entity and each category may have N-types.

So when I add a new item, first I choose the category then I show a list of types for that category for the user to choose,

How could I do that?

Thanks and regards!

Hi,

You have two collection containers with loaders, one for Category, another for Type. In the Type loader, write a query with a parameter for its category attribute. Then use DataLoadCoordinator to link the loaders, so when the user selects a Category, the Types loader is triggered with the selected Category as the parameter value.

1 Like