mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 05:01:10 +03:00
@@ -3,7 +3,7 @@ import { getOS } from '@/utils/genericHelper'
|
|||||||
|
|
||||||
const isMac = getOS() === 'macos'
|
const isMac = getOS() === 'macos'
|
||||||
|
|
||||||
const useSearchShorcut = (inputRef) => {
|
const useSearchShortcut = (inputRef) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const component = inputRef.current
|
const component = inputRef.current
|
||||||
|
|
||||||
@@ -32,4 +32,4 @@ const useSearchShorcut = (inputRef) => {
|
|||||||
}, [inputRef]) // Add inputRef to the dependency array to ensure the effect is re-applied if inputRef changes
|
}, [inputRef]) // Add inputRef to the dependency array to ensure the effect is re-applied if inputRef changes
|
||||||
}
|
}
|
||||||
|
|
||||||
export default useSearchShorcut
|
export default useSearchShortcut
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { StyledFab } from '@/ui-component/button/StyledFab'
|
|||||||
// icons
|
// icons
|
||||||
import { IconSearch, IconArrowLeft, IconEdit } from '@tabler/icons-react'
|
import { IconSearch, IconArrowLeft, IconEdit } from '@tabler/icons-react'
|
||||||
|
|
||||||
import useSearchShorcut from '@/hooks/useSearchShortcut'
|
import useSearchShortcut from '@/hooks/useSearchShortcut'
|
||||||
import { getOS } from '@/utils/genericHelper'
|
import { getOS } from '@/utils/genericHelper'
|
||||||
|
|
||||||
const os = getOS()
|
const os = getOS()
|
||||||
@@ -32,7 +32,7 @@ const ViewHeader = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme()
|
const theme = useTheme()
|
||||||
const searchInputRef = useRef()
|
const searchInputRef = useRef()
|
||||||
useSearchShorcut(searchInputRef)
|
useSearchShortcut(searchInputRef)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ flexGrow: 1, py: 1.25, width: '100%' }}>
|
<Box sx={{ flexGrow: 1, py: 1.25, width: '100%' }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user