feat: Added search and replace to Super notes on web/desktop. Press Ctrl+F in a super note to toggle search. (skip e2e) (#2128)

This commit is contained in:
Aman Harwara
2023-01-12 18:57:41 +05:30
committed by GitHub
parent 2fc365434f
commit 8104522658
21 changed files with 1180 additions and 45 deletions

View File

@@ -4,7 +4,7 @@ import { AppPaneId } from './AppPaneMetadata'
import { PaneController } from '../../Controllers/PaneController/PaneController'
import { observer } from 'mobx-react-lite'
import { PaneLayout } from '@/Controllers/PaneController/PaneLayout'
import { useStateRef } from './useStateRef'
import { useStateRef } from '@/Hooks/useStateRef'
type ResponsivePaneData = {
selectedPane: AppPaneId

View File

@@ -1,11 +0,0 @@
import { useRef, useLayoutEffect, MutableRefObject } from 'react'
export function useStateRef<State>(state: State): MutableRefObject<State> {
const ref = useRef<State>(state)
useLayoutEffect(() => {
ref.current = state
}, [state])
return ref
}