Skip to content

Commit fdeeedd

Browse files
committed
fix search to retain search query after selection
Signed-off-by: Aayush Kumar <[email protected]>
1 parent 2e2d3bd commit fdeeedd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scanpipe/templates/scanpipe/resource_tree.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@
183183
function handleSearchResultClick(searchResultItem) {
184184
const path = searchResultItem.dataset.path;
185185

186-
clearSearch();
186+
toggleSearchResults(false);
187+
searchInput.blur();
187188

188189
fetch(`{% url 'codebase_resource_table' project.slug %}?path=${encodeURIComponent(path)}`)
189190
.then(response => response.text())
@@ -206,7 +207,8 @@
206207

207208
searchInput.addEventListener('keydown', function(e) {
208209
if (e.key === 'Escape') {
209-
clearSearch();
210+
toggleSearchResults(false);
211+
searchInput.blur();
210212
}
211213
});
212214

0 commit comments

Comments
 (0)