diff --git a/web/components/core/render-if-visible-HOC.tsx b/web/components/core/render-if-visible-HOC.tsx index 8a08f1d04..26ae15285 100644 --- a/web/components/core/render-if-visible-HOC.tsx +++ b/web/components/core/render-if-visible-HOC.tsx @@ -24,10 +24,10 @@ const RenderIfVisible: React.FC = (props) => { as = "div", children, classNames = "", - alwaysRender = false, - placeholderChildren = null, - pauseHeightUpdateWhileRendering = false, - changingReference, + alwaysRender = false, //render the children even if it is not visble in root + placeholderChildren = null, //placeholder children + pauseHeightUpdateWhileRendering = false, //while this is true the height of the blocks are maintained + changingReference, //This is to force render when this reference is changed } = props; const [shouldVisible, setShouldVisible] = useState(alwaysRender); const placeholderHeight = useRef(defaultHeight); @@ -53,7 +53,6 @@ const RenderIfVisible: React.FC = (props) => { rootMargin: `${verticalOffset}% ${horizonatlOffset}% ${verticalOffset}% ${horizonatlOffset}%`, } ); - observer.unobserve(intersectionRef.current); observer.observe(intersectionRef.current); return () => { if (intersectionRef.current) { diff --git a/web/components/issues/issue-layouts/kanban/kanban-group.tsx b/web/components/issues/issue-layouts/kanban/kanban-group.tsx index 571a7bfb9..7cbda05e1 100644 --- a/web/components/issues/issue-layouts/kanban/kanban-group.tsx +++ b/web/components/issues/issue-layouts/kanban/kanban-group.tsx @@ -1,3 +1,4 @@ +import { MutableRefObject } from "react"; import { Droppable } from "@hello-pangea/dnd"; // hooks import { useProjectState } from "hooks/store"; @@ -13,7 +14,6 @@ import { TUnGroupedIssues, } from "@plane/types"; import { EIssueActions } from "../types"; -import { MutableRefObject } from "react"; interface IKanbanGroup { groupId: string; diff --git a/web/components/issues/issue-layouts/kanban/swimlanes.tsx b/web/components/issues/issue-layouts/kanban/swimlanes.tsx index 462ade1f8..5fdb58ef0 100644 --- a/web/components/issues/issue-layouts/kanban/swimlanes.tsx +++ b/web/components/issues/issue-layouts/kanban/swimlanes.tsx @@ -1,3 +1,4 @@ +import { MutableRefObject } from "react"; import { observer } from "mobx-react-lite"; // components import { KanBan } from "./default"; @@ -20,7 +21,6 @@ import { EIssueActions } from "../types"; import { useLabel, useMember, useProject, useProjectState } from "hooks/store"; import { getGroupByColumns } from "../utils"; import { TCreateModalStoreTypes } from "constants/issue"; -import { MutableRefObject } from "react"; interface ISubGroupSwimlaneHeader { issueIds: TGroupedIssues | TSubGroupedIssues | TUnGroupedIssues;