bugfixing searchbar
This commit is contained in:
parent
c47fca77f7
commit
cf70cacf4d
@ -160,11 +160,15 @@
|
||||
}
|
||||
|
||||
function handleKeyDown(symbol) {
|
||||
const list = showSuggestions
|
||||
? searchBarData
|
||||
: searchHistory?.length > 0
|
||||
? searchHistory
|
||||
: popularList;
|
||||
const list = Array.from(
|
||||
new Map(
|
||||
[...searchHistory, ...searchBarData, ...popularList].map((item) => [
|
||||
item.symbol,
|
||||
item,
|
||||
]),
|
||||
).values(),
|
||||
);
|
||||
|
||||
if (!list?.length) return;
|
||||
|
||||
const newData = list.find((item) => item?.symbol === symbol);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user