From c7278c73f3865113f62a1966640830052fd87f52 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 23 Oct 2025 15:36:16 -0700 Subject: [PATCH] Ran latest prettier --- datasette/static/navigation-search.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/datasette/static/navigation-search.js b/datasette/static/navigation-search.js index 7204ab93..ec4d2970 100644 --- a/datasette/static/navigation-search.js +++ b/datasette/static/navigation-search.js @@ -188,8 +188,9 @@ class NavigationSearch extends HTMLElement { setupEventListeners() { const dialog = this.shadowRoot.querySelector("dialog"); const input = this.shadowRoot.querySelector(".search-input"); - const resultsContainer = - this.shadowRoot.querySelector(".results-container"); + const resultsContainer = this.shadowRoot.querySelector( + ".results-container" + ); // Global keyboard listener for "/" document.addEventListener("keydown", (e) => { @@ -303,7 +304,7 @@ class NavigationSearch extends HTMLElement { this.matches = (this.allItems || []).filter( (item) => item.name.toLowerCase().includes(lowerQuery) || - item.url.toLowerCase().includes(lowerQuery), + item.url.toLowerCase().includes(lowerQuery) ); } this.selectedIndex = this.matches.length > 0 ? 0 : -1; @@ -326,17 +327,21 @@ class NavigationSearch extends HTMLElement { .map( (match, index) => `
-
${this.escapeHtml(match.name)}
+
${this.escapeHtml( + match.name + )}
${this.escapeHtml(match.url)}
- `, + ` ) .join(""); @@ -372,7 +377,7 @@ class NavigationSearch extends HTMLElement { detail: match, bubbles: true, composed: true, - }), + }) ); // Navigate to URL