-
Notifications
You must be signed in to change notification settings - Fork 202
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
Filter button not shown with GeoJsonPagination #252
Comments
hi I am facing the same issue but even after adding results it is not working do you have any idea why its not working |
this is the new code that works (for me at least)
` Add that pagination class into your ViewSets, for example: `
` The downside of this workaround is you will have empty results variable in your API response, because your data is not presented in results but in features instead. Ex: `
` I am not sure if there is a better way to do this. |
When GeoJsonPagination is used, the filter button disappear from the API view. The filter button will appear if I use other pagination class.
Here is my current environment configuration
`
`
This problem exist from when I started using DRF-gis about one year ago, but I forgot about my environment configuration at that time
Workaround that I found is to copy the existing GeoJsonPagination class as a custom pagination class, then add "results" field into the get_paginated_response function. Somehow "results" field must exist for the filter button to be shown. The filtering itself still works when the filter button is hidden.
`
`
The text was updated successfully, but these errors were encountered: