[PR #15073] [CLOSED] Closes: #9583 - Add column specific search field to tables #14515

Closed
opened 2025-12-29 23:24:55 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15073
Author: @DanSheps
Created: 2/7/2024
Status: Closed

Base: featureHead: 9583-add_column_specific_search_field_to_tables


📝 Commits (10+)

  • 4c39516 Preliminary work on 9583.
  • e762755 HTMX work on 9583.
  • f7294f7 Preliminary work on 9583.
  • 664a0eb Preliminary work on 9583.
  • cc423f5 Apply some quick fixes and add comments
  • 50557c0 Final work on #9583 for basic functionality
  • 03f67f3 CSS update for dropdown
  • 3243ebd Merge remote-tracking branch 'origin/9583-add_column_specific_search_field_to_tables' into 9583-add_column_specific_search_field_to_tables
  • b54cfd6 Update CSS
  • 5f69666 Change dropdown position and fix test failure

📊 Changes

12 files changed (+135 additions, -27 deletions)

View changed files

📝 netbox/netbox/tables/tables.py (+1 -0)
📝 netbox/netbox/views/generic/bulk_views.py (+16 -2)
📝 netbox/project-static/dist/netbox.css (+1 -1)
📝 netbox/project-static/styles/custom/_misc.scss (+17 -0)
📝 netbox/templates/generic/object_list.html (+2 -3)
📝 netbox/templates/htmx/table.html (+5 -0)
📝 netbox/templates/inc/table_controls_htmx.html (+1 -1)
📝 netbox/templates/inc/table_htmx.html (+5 -1)
netbox/utilities/templates/form_helpers/render_table_filter_field.html (+11 -0)
📝 netbox/utilities/templates/helpers/applied_filters.html (+21 -19)
📝 netbox/utilities/templatetags/form_helpers.py (+52 -0)
📝 netbox/utilities/templatetags/helpers.py (+3 -0)

📄 Description

Closes: #9583 - Add column specific search field to tables

The plan is to use the existing filterset to generate form fields on the table column headers to allow for inline-filtering using HTMX requests

Progress

  • Fields are generated for type fields HTMX requests are sent and account for both fields
  • Integrate with "quick search"
  • Works with custom fields
  • Allow dropdown to float outside of the parent div

Todo

  • Add input fields for "name" Not needed - Quick search is suitable for this
  • Fix filter float (Move before field name perhaps) Done
  • Add show/hide filter (Optional) Outside of scope

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15073 **Author:** [@DanSheps](https://github.com/DanSheps) **Created:** 2/7/2024 **Status:** ❌ Closed **Base:** `feature` ← **Head:** `9583-add_column_specific_search_field_to_tables` --- ### 📝 Commits (10+) - [`4c39516`](https://github.com/netbox-community/netbox/commit/4c39516253b658f60a11597adae68edd75ee4b7d) Preliminary work on 9583. - [`e762755`](https://github.com/netbox-community/netbox/commit/e762755e800c42d0ddeb4e77aead3a32100fd62a) HTMX work on 9583. - [`f7294f7`](https://github.com/netbox-community/netbox/commit/f7294f7087275d3c7163ad94f565d442f7ffa338) Preliminary work on 9583. - [`664a0eb`](https://github.com/netbox-community/netbox/commit/664a0eba6db2d4baf3fc96597c5d39b2f408a0b3) Preliminary work on 9583. - [`cc423f5`](https://github.com/netbox-community/netbox/commit/cc423f5071dfa995eb5bf182ec4cfadd62c0f536) Apply some quick fixes and add comments - [`50557c0`](https://github.com/netbox-community/netbox/commit/50557c0f9d57ed7d37228e817372aab1cfb2b6b7) Final work on #9583 for basic functionality - [`03f67f3`](https://github.com/netbox-community/netbox/commit/03f67f373f43bdbd16fa9154113126baa68be110) CSS update for dropdown - [`3243ebd`](https://github.com/netbox-community/netbox/commit/3243ebd1dd03e709be7a0270e7cbb09e1e8ef763) Merge remote-tracking branch 'origin/9583-add_column_specific_search_field_to_tables' into 9583-add_column_specific_search_field_to_tables - [`b54cfd6`](https://github.com/netbox-community/netbox/commit/b54cfd6ba98b845fe9f14a490d41edd94b3aa744) Update CSS - [`5f69666`](https://github.com/netbox-community/netbox/commit/5f69666b7b763171cd3fa5b46a9145479d98a9e6) Change dropdown position and fix test failure ### 📊 Changes **12 files changed** (+135 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/tables/tables.py` (+1 -0) 📝 `netbox/netbox/views/generic/bulk_views.py` (+16 -2) 📝 `netbox/project-static/dist/netbox.css` (+1 -1) 📝 `netbox/project-static/styles/custom/_misc.scss` (+17 -0) 📝 `netbox/templates/generic/object_list.html` (+2 -3) 📝 `netbox/templates/htmx/table.html` (+5 -0) 📝 `netbox/templates/inc/table_controls_htmx.html` (+1 -1) 📝 `netbox/templates/inc/table_htmx.html` (+5 -1) ➕ `netbox/utilities/templates/form_helpers/render_table_filter_field.html` (+11 -0) 📝 `netbox/utilities/templates/helpers/applied_filters.html` (+21 -19) 📝 `netbox/utilities/templatetags/form_helpers.py` (+52 -0) 📝 `netbox/utilities/templatetags/helpers.py` (+3 -0) </details> ### 📄 Description ### Closes: #9583 - Add column specific search field to tables The plan is to use the existing filterset to generate form fields on the table column headers to allow for inline-filtering using HTMX requests #### Progress * Fields are generated for <select> type fields * HTMX requests are sent and account for both <select> fields * Integrate with "quick search" * Works with custom fields * Allow dropdown to float outside of the parent div #### Todo * ~~Add input fields for "name"~~ Not needed - Quick search is suitable for this * ~~Fix filter float (Move before field name perhaps)~~ Done * ~~Add show/hide filter (Optional)~~ Outside of scope --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:24:55 +01:00
adam closed this issue 2025-12-29 23:24:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14515