diff --git a/components/fili-info.riot b/components/fili-info.riot index 0d74496..d918c23 100644 --- a/components/fili-info.riot +++ b/components/fili-info.riot @@ -23,6 +23,7 @@ diff --git a/components/main-controller.riot b/components/main-controller.riot index b629701..d4be1dc 100644 --- a/components/main-controller.riot +++ b/components/main-controller.riot @@ -5,9 +5,10 @@ + -
+
@@ -25,7 +26,7 @@ this.update({ course: course, - shouldShowInfos: course != null, + shouldShowInfos: course != null }) }, @@ -59,34 +60,18 @@ onMounted(props, state) { this.update({ course: null, -<<<<<<< HEAD - sortBy: null, - schoolList: null, - sortFields: SORT_TABLE, - filteredSchoolList: null, - shouldShowInfos: false, - school: null, - popupEnabled: false + schoolList: [], + shouldShowInfos: false }) }, - filterSearch() { - let input = this.$("input") - if (!input) return - let finalArray = [] + clearCache(e) { + localStorage.clear() + e.target.textContent = "Cache vidé !" - //On évite de trier avant d'avoir plus de 1 lettres. - if (input.value.length > 1) { - finalArray = this.state.schoolList.filter((item) => { - return item.name.toLowerCase().includes(input.value.toLowerCase()) - }) - } else { - finalArray = this.state.schoolList - } - - this.update({ - filteredSchoolList: finalArray - }) + setTimeout(() => { + e.target.textContent = "Vider le cache" + }, 3000) }, popup(school){ this.update({ @@ -100,11 +85,6 @@ popupEnabled: false }) console.log("closed!") -======= - schoolList: [], - shouldShowInfos: false - }) ->>>>>>> 6ed22586179f7de1d23fd1ebd68d111298170226 } } diff --git a/components/school-info.riot b/components/school-info.riot index cc1e9d8..bfbdc52 100644 --- a/components/school-info.riot +++ b/components/school-info.riot @@ -1,5 +1,5 @@ -