Filter reset button does not reset filter #9998

Closed
opened 2025-12-29 21:25:26 +01:00 by adam · 1 comment
Owner

Originally created by @mhdask on GitHub (Jul 23, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0.7

Python Version

3.10

Steps to Reproduce

  1. Click on Devices (I think any model that can be filtered will do)
  2. Click on filter
  3. Apply any filter (I used Status PLANNED for device)
  4. Press Reset
  5. Observe filter is still applied

Expected Behavior

The filter should have been removed / reset

Observed Behavior

The filter did not get removed / reset

Originally created by @mhdask on GitHub (Jul 23, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0.7 ### Python Version 3.10 ### Steps to Reproduce 1. Click on Devices (I think any model that can be filtered will do) 2. Click on filter 3. Apply any filter (I used Status PLANNED for device) 4. Press Reset 5. Observe filter is still applied ### Expected Behavior The filter should have been removed / reset ### Observed Behavior The filter did not get removed / reset
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:25:26 +01:00
adam closed this issue 2025-12-29 21:25:26 +01:00
Author
Owner

@arthanson commented on GitHub (Jul 29, 2024):

It looks like this routine:

  /**
   * Initialize any adjacent reset buttons so that when clicked, the page is reloaded without
   * query parameters.
   */
  private initResetButton(): void {
    const resetButton = findFirstAdjacent<HTMLButtonElement>(
      this.base,
      'button[data-reset-select]',
    );
    if (resetButton !== null) {
      resetButton.addEventListener('click', () => {
        window.location.assign(window.location.origin + window.location.pathname);
      });
    }
  }

from the old apiSelect.ts is missing.

@arthanson commented on GitHub (Jul 29, 2024): It looks like this routine: ``` /** * Initialize any adjacent reset buttons so that when clicked, the page is reloaded without * query parameters. */ private initResetButton(): void { const resetButton = findFirstAdjacent<HTMLButtonElement>( this.base, 'button[data-reset-select]', ); if (resetButton !== null) { resetButton.addEventListener('click', () => { window.location.assign(window.location.origin + window.location.pathname); }); } } ``` from the old apiSelect.ts is missing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9998