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