[PR #20811] [MERGED] Fixes #20134: Prevent HTMX OOB swaps in embedded tables #16057

Closed
opened 2025-12-30 00:25:34 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20811
Author: @jnovinger
Created: 11/15/2025
Status: Merged
Merged: 11/20/2025
Merged by: @arthanson

Base: mainHead: 20134-htmx-oob-messages


📝 Commits (1)

  • 4a8bd5b Fixes #20134: Prevent HTMX OOB swaps in embedded tables

📊 Changes

1 file changed (+5 additions, -3 deletions)

View changed files

📝 netbox/templates/htmx/table.html (+5 -3)

📄 Description

Fixes: #20134

The htmx/table.html template was unconditionally including out-of-band (OOB) swaps for UI elements that only exist on list pages, causing htmx:oobErrorNoTarget errors when tables were embedded on detail pages.

This change adds checks for table.embedded to conditionally exclude OOB swaps for .total-object-count, #table_save_link, and .bulk-action-buttons when rendering embedded tables.


🔄 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/20811 **Author:** [@jnovinger](https://github.com/jnovinger) **Created:** 11/15/2025 **Status:** ✅ Merged **Merged:** 11/20/2025 **Merged by:** [@arthanson](https://github.com/arthanson) **Base:** `main` ← **Head:** `20134-htmx-oob-messages` --- ### 📝 Commits (1) - [`4a8bd5b`](https://github.com/netbox-community/netbox/commit/4a8bd5b7ef149f76ee4c43a6f281b667188659af) Fixes #20134: Prevent HTMX OOB swaps in embedded tables ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `netbox/templates/htmx/table.html` (+5 -3) </details> ### 📄 Description ### Fixes: #20134 The `htmx/table.html` template was unconditionally including out-of-band (OOB) swaps for UI elements that only exist on list pages, causing `htmx:oobErrorNoTarget` errors when tables were embedded on detail pages. This change adds checks for `table.embedded` to conditionally exclude OOB swaps for `.total-object-count`, `#table_save_link`, and `.bulk-action-buttons` when rendering embedded tables. --- <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-30 00:25:34 +01:00
adam closed this issue 2025-12-30 00:25:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#16057