Skip to content
Snippets Groups Projects
Commit aba2ee8b authored by chris's avatar chris
Browse files

rerender boxes

parent b397bead
No related branches found
No related tags found
1 merge request!258Editoria fixes
...@@ -50,9 +50,10 @@ export default ({ comment, top, commentId, recalculateTops }) => { ...@@ -50,9 +50,10 @@ export default ({ comment, top, commentId, recalculateTops }) => {
const commentPlugin = app.PmPlugins.get('commentPlugin'); const commentPlugin = app.PmPlugins.get('commentPlugin');
const activeComment = commentPlugin.getState(activeView.state).comment; const activeComment = commentPlugin.getState(activeView.state).comment;
console.log(activeComment);
useEffect(() => { useEffect(() => {
setIsActive(false); setIsActive(false);
recalculateTops();
if (activeComment && commentId === activeComment.attrs.id) { if (activeComment && commentId === activeComment.attrs.id) {
setIsActive(true); setIsActive(true);
recalculateTops(); recalculateTops();
...@@ -138,7 +139,7 @@ export default ({ comment, top, commentId, recalculateTops }) => { ...@@ -138,7 +139,7 @@ export default ({ comment, top, commentId, recalculateTops }) => {
onClickResolve(); onClickResolve();
activeView.focus(); activeView.focus();
} }
}, 200); }, 400);
}; };
const MemorizedComponent = useMemo( const MemorizedComponent = useMemo(
......
...@@ -67,6 +67,7 @@ export default ({ trackChangeId, top, recalculateTops, trackChange }) => { ...@@ -67,6 +67,7 @@ export default ({ trackChangeId, top, recalculateTops, trackChange }) => {
useEffect(() => { useEffect(() => {
setIsActive(false); setIsActive(false);
recalculateTops();
if (activeTrackChange && trackChangeId === activeTrackChange.attrs.id) { if (activeTrackChange && trackChangeId === activeTrackChange.attrs.id) {
setIsActive(true); setIsActive(true);
recalculateTops(); recalculateTops();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment