add comments and minor changes

This commit is contained in:
rahulramesha 2024-02-08 19:41:50 +05:30
parent 83b31ec109
commit b5ebce6ce2
3 changed files with 6 additions and 7 deletions

View File

@ -24,10 +24,10 @@ const RenderIfVisible: React.FC<Props> = (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<boolean>(alwaysRender);
const placeholderHeight = useRef<string>(defaultHeight);
@ -53,7 +53,6 @@ const RenderIfVisible: React.FC<Props> = (props) => {
rootMargin: `${verticalOffset}% ${horizonatlOffset}% ${verticalOffset}% ${horizonatlOffset}%`,
}
);
observer.unobserve(intersectionRef.current);
observer.observe(intersectionRef.current);
return () => {
if (intersectionRef.current) {

View File

@ -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;

View File

@ -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;