bugfixing searchbar enter
This commit is contained in:
parent
98a07486eb
commit
f24f6db31c
@ -220,7 +220,14 @@
|
|||||||
if (e?.charCode === 13) {
|
if (e?.charCode === 13) {
|
||||||
focusedSuggestion = "";
|
focusedSuggestion = "";
|
||||||
|
|
||||||
if (!notFoundTicker) {
|
if (searchResults?.length > 0) {
|
||||||
|
// Use the first search result
|
||||||
|
const firstResult = searchResults[0];
|
||||||
|
searchQuery = firstResult.symbol;
|
||||||
|
assetType = firstResult.type;
|
||||||
|
searchBarTicker(firstResult.symbol, firstResult.type);
|
||||||
|
} else if (!notFoundTicker && searchQuery) {
|
||||||
|
// Fallback to original behavior if no search results
|
||||||
searchBarTicker(searchQuery, assetType);
|
searchBarTicker(searchQuery, assetType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user