Properly clean the modal when selecting an item
This commit is contained in:
parent
9e3bc95ec8
commit
5659568345
1 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue