mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Update review panel entries on layout resize (#21323)
GitOrigin-RevId: db9b01609a2425952671e30fc20c16de4d3b36a8
This commit is contained in:
parent
34c3647244
commit
4bcc7c9602
1 changed files with 4 additions and 1 deletions
|
@ -116,7 +116,7 @@ const ReviewPanelCurrentFile: FC = () => {
|
||||||
false
|
false
|
||||||
)?.addCommentRanges
|
)?.addCommentRanges
|
||||||
|
|
||||||
useEffect(() => {
|
const positionsMeasureRequest = useCallback(() => {
|
||||||
if (aggregatedRanges) {
|
if (aggregatedRanges) {
|
||||||
view.requestMeasure({
|
view.requestMeasure({
|
||||||
key: 'review-panel-position',
|
key: 'review-panel-position',
|
||||||
|
@ -177,6 +177,9 @@ const ReviewPanelCurrentFile: FC = () => {
|
||||||
}
|
}
|
||||||
}, [view, aggregatedRanges, addCommentRanges])
|
}, [view, aggregatedRanges, addCommentRanges])
|
||||||
|
|
||||||
|
useEffect(positionsMeasureRequest, [positionsMeasureRequest])
|
||||||
|
useEventListener('editor:geometry-change', positionsMeasureRequest)
|
||||||
|
|
||||||
const showEmptyState = useMemo(
|
const showEmptyState = useMemo(
|
||||||
() => hasActiveRange(ranges, threads) === false,
|
() => hasActiveRange(ranges, threads) === false,
|
||||||
[ranges, threads]
|
[ranges, threads]
|
||||||
|
|
Loading…
Reference in a new issue