docs,api-ref: added search filters (#4830)
* initial implementation of search modal * added hit and search suggestions * added support for multiple indices * updated sample env * added close when click outside dropdown * test for mobile * added mobile design * added shortcut * dark mode fixes * added search to docs * added plugins filter * added React import * moved filters to configurations * handled error on page load * change suggestion text * removed hits limit * handle select all * open link in current tab * change highlight colors * added support for shortcuts + auto focus * change header and footer * redesigned search ui
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import React, { useContext, useEffect, useState } from "react"
|
||||
import React, { useContext, useState } from "react"
|
||||
import { createContext } from "react"
|
||||
import Modal, { ModalProps } from "../components/Modal"
|
||||
|
||||
@@ -23,14 +23,6 @@ const ModalProvider = ({ children }: ModalProviderProps) => {
|
||||
setModalProps(null)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (modalProps) {
|
||||
document.body.setAttribute("data-modal", "opened")
|
||||
} else {
|
||||
document.body.removeAttribute("data-modal")
|
||||
}
|
||||
}, [modalProps])
|
||||
|
||||
return (
|
||||
<ModalContext.Provider
|
||||
value={{
|
||||
|
||||
Reference in New Issue
Block a user