From 054aa531de06ba860e83e2e42fc0f63178c4b796 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Mon, 14 Oct 2024 12:07:39 +0200 Subject: [PATCH] bugfixing --- src/routes/watchlist/stocks/+page.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/watchlist/stocks/+page.svelte b/src/routes/watchlist/stocks/+page.svelte index 476f9c9f..9f579d45 100644 --- a/src/routes/watchlist/stocks/+page.svelte +++ b/src/routes/watchlist/stocks/+page.svelte @@ -420,6 +420,8 @@ function isChecked(item) { } function sortIndicatorCheckMarks(allRows) { + const priorityItems = new Set(['AI Score', 'Revenue', 'Net Income', 'Free Cash Flow']); + return allRows.sort((a, b) => { const isAChecked = checkedItems.has(a.name); const isBChecked = checkedItems.has(b.name); @@ -445,6 +447,7 @@ function sortIndicatorCheckMarks(allRows) { } + async function handleChangeValue(value) { if (checkedItems.has(value)) { checkedItems.delete(value); // Remove the value if it's already in the Set @@ -456,7 +459,6 @@ async function handleChangeValue(value) { allRows = [...allRows]; ruleOfList = [...ruleOfList]; -const priorityItems = new Set(['AI Score', 'Revenue', 'Net Income', 'Free Cash Flow']); allRows = sortIndicatorCheckMarks(allRows)