mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-09-10 03:48:21 +02:00
Search empty values when reopening
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { Dispatch, ReactNode, useContext, useState } from 'react'
|
import {Dispatch, ReactNode, useContext, useEffect, useState} from 'react'
|
||||||
import {
|
import {
|
||||||
List,
|
List,
|
||||||
ListItem,
|
ListItem,
|
||||||
@@ -59,6 +59,13 @@ export default function Search({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (open){
|
||||||
|
setSelectedConnector(undefined);
|
||||||
|
setSearchResults([]);
|
||||||
|
}
|
||||||
|
}, [open]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal open={open} onClose={() => setOpen(false)}>
|
<Modal open={open} onClose={() => setOpen(false)}>
|
||||||
<ModalDialog sx={{ width: '90vw' }}>
|
<ModalDialog sx={{ width: '90vw' }}>
|
||||||
|
Reference in New Issue
Block a user