mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
add comments and minor changes
This commit is contained in:
parent
83b31ec109
commit
b5ebce6ce2
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user