mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
clear input box on search modal close
This commit is contained in:
@@ -149,10 +149,13 @@ export default function SearchModal({
|
||||
searchOpen: boolean
|
||||
setSearchOpen: Dispatch<SetStateAction<boolean>>
|
||||
}) {
|
||||
const closeSearchBox = () => setSearchOpen(false)
|
||||
|
||||
const { query, setQuery, results } = useDriveItemSearch()
|
||||
|
||||
const closeSearchBox = () => {
|
||||
setSearchOpen(false)
|
||||
setQuery('')
|
||||
}
|
||||
|
||||
return (
|
||||
<Transition appear show={searchOpen} as={Fragment}>
|
||||
<Dialog as="div" className="inset-0 z-[200] fixed overflow-y-auto" onClose={closeSearchBox}>
|
||||
|
||||
Reference in New Issue
Block a user