fix: input defocus on market and transactions page
This commit is contained in:
parent
bb7062987b
commit
0e68eb8c42
2 changed files with 27 additions and 5 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Reference in a new issue