From 9e36bf9cd15b607fcc59173de4b7b9da1c0265ad Mon Sep 17 00:00:00 2001 From: ferricles Date: Thu, 12 May 2022 18:09:10 -0700 Subject: [PATCH] reset item search button functionality --- js/sq2items.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/sq2items.js b/js/sq2items.js index 313398d..5699044 100644 --- a/js/sq2items.js +++ b/js/sq2items.js @@ -190,6 +190,13 @@ function doItemSearch() { displayItems(items_copy); } +function resetItemSearch() { + resetFields = ["name-choice", "category-choice", "rarity-choice", "level-choice", "filter1-choice", "filter2-choice", "filter3-choice", "filter4-choice"] + for (const field of resetFields) { + document.getElementById(field).value = ""; + } +} + function init_items() { items_expanded = items.filter( (i) => !("remapID" in i) ).map( (i) => expandItem(i, []) ); }