i’m using the latest strapi release. Is it possible to customize the dropdown “load” logic (on a relation attribute/collection type) ? for example, to reduce the items with custom logic ?
We don’t currently have a straight forward way of applying filtering to those drop-downs yet. The feature request has come up various time (typically called a parent/child relationship, dependent relationship, or pre-filtered relationships)
is there a workeraround ? Is it possible to set the Dropdownlist to invisible on the Admin-UI and set the specific Attribute in the Model (Event: afterCreate) ? The needed information is available on the current Userobject.
In my case a relational property should not be able to be set by the user himself, but rather
by its relation to another object (in my example the school).
I could find a solution in the meantime, as describe I have hidden the relational dropdownlist
on the UI and set the value in the beforeCreate event (based on the “created_by” value).
I would love to overwrite the logic of dropdown filtering from combobox, because it always filter by “startsWith” and I don’t wan’t that. For example, I have several relationthips called “council of blablabla”, “council of blebleble” ─ but not all of them. I want to be able to search “blebleble” and get “council of blebleble”, but it only works if i write “council of blebleble”. As we add a lot of new items every day, writing “council of blebleble” is a bad idea for my users, they want to do it in the shorter way as possibile.
My idea was to write a custom logic or even disable the combobox logic, as the search is already filtering very well, but I digged into the code and I think it is not possible.