From 565956834517e9c92721ffc29df9077a9319558f Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 11 Mar 2022 02:36:18 -0800 Subject: [PATCH] Properly clean the modal when selecting an item --- components/SearchModal/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/SearchModal/index.tsx b/components/SearchModal/index.tsx index 1ab0805d..61d63a82 100644 --- a/components/SearchModal/index.tsx +++ b/components/SearchModal/index.tsx @@ -133,7 +133,7 @@ const SearchModal = (props: Props) => { function sendData(result: Character | Weapon | Summon) { props.send(result, props.fromPosition) - setOpen(false) + openChange() } function receiveFilters(filters: { [key: string]: number[] }) { @@ -256,7 +256,10 @@ const SearchModal = (props: Props) => { function openChange() { if (open) { setQuery('') + setFirstLoad(true) setResults([]) + setRecordCount(0) + setCurrentPage(1) setOpen(false) } else { setOpen(true)