Cannot bulk select objects after HTMX request #5817

Closed
opened 2025-12-29 19:33:04 +01:00 by adam · 3 comments
Owner

Originally created by @DanSheps on GitHub (Dec 21, 2021).

Originally assigned to: @thatmattlove on GitHub.

NetBox version

3.1.2

Python version

3.8

Steps to Reproduce

  1. Create x number of sites, where x > 50
  2. Set per-page to 25 if not already
  3. Attempt pagination navigation
  4. Attempt to select all objects on the page

Expected Behavior

All objects on the new page will be selected

Observed Behavior

No objects selected

Originally created by @DanSheps on GitHub (Dec 21, 2021). Originally assigned to: @thatmattlove on GitHub. ### NetBox version 3.1.2 ### Python version 3.8 ### Steps to Reproduce 1. Create x number of sites, where x > 50 2. Set per-page to 25 if not already 3. Attempt pagination navigation 4. Attempt to select all objects on the page ### Expected Behavior All objects on the new page will be selected ### Observed Behavior No objects selected
adam added the type: bugstatus: accepted labels 2025-12-29 19:33:04 +01:00
adam closed this issue 2025-12-29 19:33:04 +01:00
Author
Owner

@DanSheps commented on GitHub (Dec 21, 2021):

Quick screenshot from demo with a query in case it isn't clear

HTMX query failure

@DanSheps commented on GitHub (Dec 21, 2021): Quick screenshot from demo with a query in case it isn't clear ![HTMX query failure](https://user-images.githubusercontent.com/11049792/146966673-15d20bc4-e68d-4ad1-8db1-e4bcff5fd6ff.PNG)
Author
Owner

@kkthxbye-code commented on GitHub (Dec 21, 2021):

The event listener is probably gone when htmx replaces the table. I see that htmx has htmx.onLoad which should probably be used to trigger initSelectAll(). Might require some refactoring though.

@kkthxbye-code commented on GitHub (Dec 21, 2021): The event listener is probably gone when htmx replaces the table. I see that htmx has `htmx.onLoad` which should probably be used to trigger initSelectAll(). Might require some refactoring though.
Author
Owner

@jeremystretch commented on GitHub (Dec 21, 2021):

@thatmattlove can you confirm? Is there an alternate way that we can initialize the listener so that new DOM elements are also caught?

@jeremystretch commented on GitHub (Dec 21, 2021): @thatmattlove can you confirm? Is there an alternate way that we can initialize the listener so that new DOM elements are also caught?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5817