-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow filtering from columns #1020
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1020 +/- ##
==========================================
+ Coverage 77.50% 81.97% +4.47%
==========================================
Files 132 132
Lines 4868 4866 -2
==========================================
+ Hits 3773 3989 +216
+ Misses 1095 877 -218 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you write a test that shows the use of filter_field? The doc-string is a bit vague. You just need to show how the customization-blob for the column looks like. Or you could figure out some other way to show how to use it.
|
def setUp(self): | ||
request = RequestFactory().get("/incidents") | ||
request.user = PersonUserFactory() | ||
request.htmx = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For other reviewers: request.htmx is explicitly set because we skip the middleware when we build a request directly like this.
moved from Uninett/argus-htmx-frontend#144
Allow specifiying when a column may be "filterable" (by specifying the
IncidentTableColumn.filter_field
). This means:filter_field
as the query param to filter incidentsTODO:
IncidentTableColumn.filter_field
is setLimitations: