From a94167c8a09d7b94b56e467965ca4601f29956b0 Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Mon, 8 Apr 2024 11:02:59 +0200 Subject: [PATCH] scrollable + better search --- .../ResearcherProfile.vue | 60 +++++++++---------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/frontend/src/Apps/ScientificPublications/ResearcherProfile.vue b/frontend/src/Apps/ScientificPublications/ResearcherProfile.vue index e369027..c506f62 100644 --- a/frontend/src/Apps/ScientificPublications/ResearcherProfile.vue +++ b/frontend/src/Apps/ScientificPublications/ResearcherProfile.vue @@ -17,7 +17,11 @@ const articleList = [ "The composition of the light", "The composition of the sand", "Fluctuation in universe beavers", - "The Potato War" + "The Potato War", + "The Potato War", + "The Potato War", + "The Potato War", + "The Potato War", ] const jsonMockViewsByYears= [ @@ -34,7 +38,10 @@ function searchInList(list, searchInput){ let retList =[] for (let i = 0; i < list.length; i++) { console.log(list[i] + " et " + searchInput + " vaut " + lDistance(list[i], searchInput) ) - if (lDistance(list[i], searchInput) < 6){ + if (lDistance(list[i], searchInput) < 10){ + retList.push(list[i]) + } + else if(list[i].toUpperCase().indexOf(searchInput.toUpperCase()) > -1){ retList.push(list[i]) } } @@ -136,7 +143,7 @@ function update(){