change kanban group virtualization logic (#5664)
This commit is contained in:
parent
a4933b5614
commit
66cfc7344e
6 changed files with 2 additions and 10 deletions
|
|
@ -75,7 +75,7 @@ const RenderIfVisible: React.FC<Props> = (props) => {
|
||||||
}, [isVisible, intersectionRef, shouldRecordHeights]);
|
}, [isVisible, intersectionRef, shouldRecordHeights]);
|
||||||
|
|
||||||
const child = isVisible ? <>{children}</> : placeholderChildren;
|
const child = isVisible ? <>{children}</> : placeholderChildren;
|
||||||
const style = isVisible || placeholderChildren ? {} : { height: placeholderHeight.current, width: "100%" };
|
const style = isVisible || !shouldRecordHeights ? {} : { height: placeholderHeight.current, width: "100%" };
|
||||||
const className = isVisible || placeholderChildren ? classNames : cn(classNames, "bg-custom-background-80");
|
const className = isVisible || placeholderChildren ? classNames : cn(classNames, "bg-custom-background-80");
|
||||||
|
|
||||||
return React.createElement(as, { ref: intersectionRef, style, className }, child);
|
return React.createElement(as, { ref: intersectionRef, style, className }, child);
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ export const KanBan: React.FC<IKanBan> = observer((props) => {
|
||||||
|
|
||||||
{groupByVisibilityToggle.showIssues && (
|
{groupByVisibilityToggle.showIssues && (
|
||||||
<RenderIfVisible
|
<RenderIfVisible
|
||||||
verticalOffset={0}
|
verticalOffset={100}
|
||||||
horizontalOffset={100}
|
horizontalOffset={100}
|
||||||
root={scrollableContainerRef}
|
root={scrollableContainerRef}
|
||||||
classNames="relative h-full"
|
classNames="relative h-full"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ import { HIGHLIGHT_CLASS, getIssueBlockId, isIssueNew } from "../utils";
|
||||||
import { TRenderQuickActions } from "./list-view-types";
|
import { TRenderQuickActions } from "./list-view-types";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
issueIds: string[];
|
|
||||||
issueId: string;
|
issueId: string;
|
||||||
issuesMap: TIssueMap;
|
issuesMap: TIssueMap;
|
||||||
updateIssue: ((projectId: string | null, issueId: string, data: Partial<TIssue>) => Promise<void>) | undefined;
|
updateIssue: ((projectId: string | null, issueId: string, data: Partial<TIssue>) => Promise<void>) | undefined;
|
||||||
|
|
@ -44,7 +43,6 @@ type Props = {
|
||||||
|
|
||||||
export const IssueBlockRoot: FC<Props> = observer((props) => {
|
export const IssueBlockRoot: FC<Props> = observer((props) => {
|
||||||
const {
|
const {
|
||||||
issueIds,
|
|
||||||
issueId,
|
issueId,
|
||||||
issuesMap,
|
issuesMap,
|
||||||
groupId,
|
groupId,
|
||||||
|
|
@ -161,7 +159,6 @@ export const IssueBlockRoot: FC<Props> = observer((props) => {
|
||||||
subIssues?.map((subIssueId) => (
|
subIssues?.map((subIssueId) => (
|
||||||
<IssueBlockRoot
|
<IssueBlockRoot
|
||||||
key={`${subIssueId}`}
|
key={`${subIssueId}`}
|
||||||
issueIds={issueIds}
|
|
||||||
issueId={subIssueId}
|
issueId={subIssueId}
|
||||||
issuesMap={issuesMap}
|
issuesMap={issuesMap}
|
||||||
updateIssue={updateIssue}
|
updateIssue={updateIssue}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ export const IssueBlocksList: FC<Props> = (props) => {
|
||||||
issueIds.map((issueId: string, index: number) => (
|
issueIds.map((issueId: string, index: number) => (
|
||||||
<IssueBlockRoot
|
<IssueBlockRoot
|
||||||
key={issueId}
|
key={issueId}
|
||||||
issueIds={issueIds}
|
|
||||||
issueId={issueId}
|
issueId={issueId}
|
||||||
issuesMap={issuesMap}
|
issuesMap={issuesMap}
|
||||||
updateIssue={updateIssue}
|
updateIssue={updateIssue}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ interface Props {
|
||||||
issueId: string;
|
issueId: string;
|
||||||
isScrolled: MutableRefObject<boolean>;
|
isScrolled: MutableRefObject<boolean>;
|
||||||
containerRef: MutableRefObject<HTMLTableElement | null>;
|
containerRef: MutableRefObject<HTMLTableElement | null>;
|
||||||
issueIds: string[];
|
|
||||||
spreadsheetColumnsList: (keyof IIssueDisplayProperties)[];
|
spreadsheetColumnsList: (keyof IIssueDisplayProperties)[];
|
||||||
spacingLeft?: number;
|
spacingLeft?: number;
|
||||||
selectionHelpers: TSelectionHelper;
|
selectionHelpers: TSelectionHelper;
|
||||||
|
|
@ -57,7 +56,6 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
|
||||||
canEditProperties,
|
canEditProperties,
|
||||||
isScrolled,
|
isScrolled,
|
||||||
containerRef,
|
containerRef,
|
||||||
issueIds,
|
|
||||||
spreadsheetColumnsList,
|
spreadsheetColumnsList,
|
||||||
spacingLeft = 6,
|
spacingLeft = 6,
|
||||||
selectionHelpers,
|
selectionHelpers,
|
||||||
|
|
@ -124,7 +122,6 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
|
||||||
portalElement={portalElement}
|
portalElement={portalElement}
|
||||||
isScrolled={isScrolled}
|
isScrolled={isScrolled}
|
||||||
containerRef={containerRef}
|
containerRef={containerRef}
|
||||||
issueIds={issueIds}
|
|
||||||
spreadsheetColumnsList={spreadsheetColumnsList}
|
spreadsheetColumnsList={spreadsheetColumnsList}
|
||||||
selectionHelpers={selectionHelpers}
|
selectionHelpers={selectionHelpers}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,6 @@ export const SpreadsheetTable = observer((props: Props) => {
|
||||||
portalElement={portalElement}
|
portalElement={portalElement}
|
||||||
containerRef={containerRef}
|
containerRef={containerRef}
|
||||||
isScrolled={isScrolled}
|
isScrolled={isScrolled}
|
||||||
issueIds={issueIds}
|
|
||||||
spreadsheetColumnsList={spreadsheetColumnsList}
|
spreadsheetColumnsList={spreadsheetColumnsList}
|
||||||
selectionHelpers={selectionHelpers}
|
selectionHelpers={selectionHelpers}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue