fix: input defocus on market and transactions page

This commit is contained in:
Face 2025-05-31 13:55:56 +03:00
parent bb7062987b
commit 0e68eb8c42
2 changed files with 27 additions and 5 deletions

View file

@ -122,10 +122,19 @@
function performSearch() {
currentPage = 1;
updateURL();
fetchTransactions();
}
function updateSearchUrl() {
updateURL();
}
function handleSearchKeydown(event: KeyboardEvent) {
if (event.key === 'Enter') {
updateSearchUrl();
}
}
$effect(() => {
if (searchQuery !== previousSearchQueryForEffect) {
debouncedSearch();
@ -271,6 +280,8 @@
bind:value={searchQuery}
placeholder="Search by coin name or symbol..."
class="pl-10 pr-4"
onblur={updateSearchUrl}
onkeydown={handleSearchKeydown}
/>
</div>