-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: searching by id #522
Comments
I have faced the same problem and have the same need to search by an ID (primary key) or the relationship itself. In my case:
A User belongs to a Client. I want to search based on the Client (or the Client id if I am forced to, as plan B) |
Possible solution (for sqla):
I must warn you that the code on the basis of which I am making changes is old and may differ from the latest version of starlette_admin, but I marked the lines that I added with a plus sign so that the principle would be clear |
Describe the bug
Is there ant way to enable searching by id?
If i trying to include "id" in "searchable_fields" search starts working incorrect: it stops filtering reccord, but only highlights matches on the current page if they are if or not.
without "id" in "searchable_fields":
with "id" in "searchable_fields":
To Reproduce
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: