Search on relationship fields by default
Last updated
Last updated
By default, the search is performed only on the classic columns of your table and does not take into account the belongsTo fields.
You usually have the possibility to click on Try an extended search
to extend the search to belongsTo
fields in a second step.
But you can as well extend Forest Admin's default routes to use the extended search by default.
An admin backend running on forest-express-sequelize
This directory contains the customers.js
file where the model is declared.
You will have to update the routes that get the list
but also the count
of customers.
With this snippet, only the customers'
collection would use extended search by default.
Using extended search is less performant than default search. Use this wisely.