Skip to content

Fix some minor stuff in the Filter component #545

@KarelJanVanHaute

Description

@KarelJanVanHaute

Add this to the component, so these buttons will work on initial load.

const clearElements = document.querySelectorAll('[data-filter-clear-elements]');
    clearElements.forEach((element) => {
      if (element instanceof HTMLElement) {
        element.addEventListener('click', (e) => {
          e.preventDefault();
          const data = JSON.parse(element.getAttribute('data-filter-clear-elements'));
          this.clearElements(data);
        });
      }
    });

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions