Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions static/js/integrations-filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,27 @@ function handleAlphaFilterClick(event) {
filterGridItems(); // Apply filter based on the selected first letter
}

// Function to handle key down events
function keyDownHandler(event) {
switch (event.key) {
case "Enter":
visibleLibrariesAndTools = document.querySelectorAll("article.flex.flex-col.gap-2.transition.relative:not([style='display: none;'])")
if (visibleLibrariesAndTools.length == 1) {
event.preventDefault();
libraryAndToolHref = visibleLibrariesAndTools[0].getElementsByTagName("a")[0].href
window.location.assign(libraryAndToolHref)
};
default:
return;
}
};

// Listen for change events on the group filter
groupFilter.addEventListener('change', filterGridItems);

// Listen for input events on the name filter
nameFilter.addEventListener('input', filterGridItems);
nameFilter.addEventListener('keydown', keyDownHandler);

// Attach click event listeners to alpha filter buttons
alphaFilterButtons.forEach(button => {
Expand Down
Loading