when you click on a filter button (e.g., Active or Inactive), the event listeners are resetting and the toggles stop working because each time the data is being re-rendered, you're essentially creating new extension objects without reattaching the event listeners for the toggle buttons. if you wanna fix this, you can modify the event listeners to be attached once when the page first loads and only call the display logic inside your filtering logic.
Move the toggle event listener setup outside the showData function so that the event listeners are only attached once. Also, when you filter, just update the displayed extensions, and make sure that the setCheckboxState method is called to reflect the correct state of the toggles.