Select All check box in device Types Interfaces fails to check all boxes #9154

Closed
opened 2025-12-29 20:46:20 +01:00 by adam · 3 comments
Owner

Originally created by @xkilian on GitHub (Jan 25, 2024).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v3.7.0

Python Version

3.8

Steps to Reproduce

  1. Create a device Template with more than 50 interfaces
  2. Go to Device Types
  3. Click name of device-type
  4. Click on Interfaces
  5. Click on per page widget to allow 100 lines to be displayed
  6. Click on Check box next to name column

Expected Behavior

All the checkboxes should be selected.

Observed Behavior

Only the signle box next to name is selected.

Originally created by @xkilian on GitHub (Jan 25, 2024). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v3.7.0 ### Python Version 3.8 ### Steps to Reproduce 1. Create a device Template with more than 50 interfaces 2. Go to Device Types 3. Click name of device-type 4. Click on Interfaces 5. Click on per page widget to allow 100 lines to be displayed 6. Click on Check box next to name column ### Expected Behavior All the checkboxes should be selected. ### Observed Behavior Only the signle box next to name is selected.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:46:20 +01:00
adam closed this issue 2025-12-29 20:46:20 +01:00
Author
Owner

@xkilian commented on GitHub (Jan 25, 2024):

I also noticed that navigating between Interfaces and Console Ports or Power Ports, the All check box next to Name will start functioning again, but the Number of lines widget setting is not preserved.

@xkilian commented on GitHub (Jan 25, 2024): I also noticed that navigating between Interfaces and Console Ports or Power Ports, the All check box next to Name will start functioning again, but the Number of lines widget setting is not preserved.
Author
Owner

@jeremystretch commented on GitHub (Jan 29, 2024):

It looks like the "select all" event handler isn't getting reinitialized after the table is re-rendered via an HTMX request (e.g. changing the ordering or pagination length).

@jeremystretch commented on GitHub (Jan 29, 2024): It looks like the "select all" event handler isn't getting reinitialized after the table is re-rendered via an HTMX request (e.g. changing the ordering or pagination length).
Author
Owner

@jeremystretch commented on GitHub (Jan 29, 2024):

There's a bug in how event handlers are added to the dynamic object list. HTMX controls within the table reference the HTMX container as closest .htmx-container, but this is obviously relative. When initHtmx() attempts to resolves this, it fails. It only works on the regular object list view because the quick search field coincidentally refers to the container by its explicit ID (#object_list); the quick search field is not present on the device type components list.

@jeremystretch commented on GitHub (Jan 29, 2024): There's a bug in how event handlers are added to the dynamic object list. HTMX controls within the table reference the HTMX container as `closest .htmx-container`, but this is obviously relative. When `initHtmx()` attempts to resolves this, it fails. It only works on the regular object list view because the quick search field coincidentally refers to the container by its explicit ID (`#object_list`); the quick search field is not present on the device type components list.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9154