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",
|
as = "div",
|
||||||
children,
|
children,
|
||||||
classNames = "",
|
classNames = "",
|
||||||
alwaysRender = false,
|
alwaysRender = false, //render the children even if it is not visble in root
|
||||||
placeholderChildren = null,
|
placeholderChildren = null, //placeholder children
|
||||||
pauseHeightUpdateWhileRendering = false,
|
pauseHeightUpdateWhileRendering = false, //while this is true the height of the blocks are maintained
|
||||||
changingReference,
|
changingReference, //This is to force render when this reference is changed
|
||||||
} = props;
|
} = props;
|
||||||
const [shouldVisible, setShouldVisible] = useState<boolean>(alwaysRender);
|
const [shouldVisible, setShouldVisible] = useState<boolean>(alwaysRender);
|
||||||
const placeholderHeight = useRef<string>(defaultHeight);
|
const placeholderHeight = useRef<string>(defaultHeight);
|
||||||
@ -53,7 +53,6 @@ const RenderIfVisible: React.FC<Props> = (props) => {
|
|||||||
rootMargin: `${verticalOffset}% ${horizonatlOffset}% ${verticalOffset}% ${horizonatlOffset}%`,
|
rootMargin: `${verticalOffset}% ${horizonatlOffset}% ${verticalOffset}% ${horizonatlOffset}%`,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
observer.unobserve(intersectionRef.current);
|
|
||||||
observer.observe(intersectionRef.current);
|
observer.observe(intersectionRef.current);
|
||||||
return () => {
|
return () => {
|
||||||
if (intersectionRef.current) {
|
if (intersectionRef.current) {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { MutableRefObject } from "react";
|
||||||
import { Droppable } from "@hello-pangea/dnd";
|
import { Droppable } from "@hello-pangea/dnd";
|
||||||
// hooks
|
// hooks
|
||||||
import { useProjectState } from "hooks/store";
|
import { useProjectState } from "hooks/store";
|
||||||
@ -13,7 +14,6 @@ import {
|
|||||||
TUnGroupedIssues,
|
TUnGroupedIssues,
|
||||||
} from "@plane/types";
|
} from "@plane/types";
|
||||||
import { EIssueActions } from "../types";
|
import { EIssueActions } from "../types";
|
||||||
import { MutableRefObject } from "react";
|
|
||||||
|
|
||||||
interface IKanbanGroup {
|
interface IKanbanGroup {
|
||||||
groupId: string;
|
groupId: string;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { MutableRefObject } from "react";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
// components
|
// components
|
||||||
import { KanBan } from "./default";
|
import { KanBan } from "./default";
|
||||||
@ -20,7 +21,6 @@ import { EIssueActions } from "../types";
|
|||||||
import { useLabel, useMember, useProject, useProjectState } from "hooks/store";
|
import { useLabel, useMember, useProject, useProjectState } from "hooks/store";
|
||||||
import { getGroupByColumns } from "../utils";
|
import { getGroupByColumns } from "../utils";
|
||||||
import { TCreateModalStoreTypes } from "constants/issue";
|
import { TCreateModalStoreTypes } from "constants/issue";
|
||||||
import { MutableRefObject } from "react";
|
|
||||||
|
|
||||||
interface ISubGroupSwimlaneHeader {
|
interface ISubGroupSwimlaneHeader {
|
||||||
issueIds: TGroupedIssues | TSubGroupedIssues | TUnGroupedIssues;
|
issueIds: TGroupedIssues | TSubGroupedIssues | TUnGroupedIssues;
|
||||||
|
Loading…
Reference in New Issue
Block a user