You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are no similar issues or pull requests for this yet.
Is your feature related to a problem? Please describe.
I want to be able to filter by specific column.
Describe the solution you would like.
Filtering by specific columns, having dropdowns for foreign keys or enums, yes or no options for booleans, and text inputs for varchars, etc., similar to Django Admin Filtering.
Describe alternatives you considered
This could be a path to start working with this:
Add filter filter_by as an array of string making refernce to the colums:
Get filters from query params, in the list endpoint:
@login_requiredasyncdeflist(self, request: Request) ->Response:
"""List route to display paginated Model instances."""
...
filters= {}
forcolinmodel_view.filter_by:
ifcolinrequest.query_params:
filters[col] =request.query_params[col]
# send filters to list method of the model_view instancepagination=awaitmodel_view.list(page, page_size, search, sort_by, sort, filters)
The next steps would be to actually filter for these fields in the list method of the ModelView and render the appropriate forms based on the active filters.
Additional context
No response
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
The text was updated successfully, but these errors were encountered:
Checklist
Is your feature related to a problem? Please describe.
I want to be able to filter by specific column.
Describe the solution you would like.
Filtering by specific columns, having dropdowns for foreign keys or enums, yes or no options for booleans, and text inputs for varchars, etc., similar to Django Admin Filtering.
Describe alternatives you considered
This could be a path to start working with this:
Add filter
filter_by
as an array of string making refernce to the colums:Declare the property in ModelView:
Get filters from query params, in the list endpoint:
The next steps would be to actually filter for these fields in the list method of the ModelView and render the appropriate forms based on the active filters.
Additional context
No response
Upvote & Fund
The text was updated successfully, but these errors were encountered: