mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-15 03:05:41 +00:00
Merge pull request #14076 from overleaf/ii-indicator-ref-type-improvement
[web] Make the indicator ref type dynamic GitOrigin-RevId: b66aa0f5ffc5c8071462e7e082ece21ef292b4fa
This commit is contained in:
parent
78fb4f8d2f
commit
231278d1ca
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@ import { flushSync } from 'react-dom'
|
|||
import { useReviewPanelUpdaterFnsContext } from '../../../context/review-panel/review-panel-context'
|
||||
import { useLayoutContext } from '../../../../../shared/context/layout-context'
|
||||
import useScopeValue from '../../../../../shared/hooks/use-scope-value'
|
||||
import EntryIndicator from '../entries/entry-indicator'
|
||||
|
||||
export type Coordinates = {
|
||||
x: number
|
||||
|
@ -16,7 +17,9 @@ function useIndicatorHover() {
|
|||
const { reviewPanelOpen } = useLayoutContext()
|
||||
const { setLayoutSuspended, handleLayoutChange } =
|
||||
useReviewPanelUpdaterFnsContext()
|
||||
const indicatorRef = useRef<HTMLDivElement | null>(null)
|
||||
const indicatorRef = useRef<React.ElementRef<typeof EntryIndicator> | null>(
|
||||
null
|
||||
)
|
||||
|
||||
const endHover = useCallback(() => {
|
||||
if (!reviewPanelOpen && !layoutToLeft) {
|
||||
|
|
Loading…
Add table
Reference in a new issue