mirror of
https://github.com/makeplane/plane.git
synced 2026-02-04 21:21:03 -06:00
fix: spreadsheet flicker issue (#5769)
This commit is contained in:
committed by
sriram veeraghanta
parent
8981e52dcc
commit
55f44e0245
@@ -18,7 +18,7 @@ import { SPREADSHEET_SELECT_GROUP } from "@/constants/spreadsheet";
|
||||
// helper
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useProject } from "@/hooks/store";
|
||||
import { useIssueDetail, useIssues, useProject } from "@/hooks/store";
|
||||
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
||||
import { TSelectionHelper } from "@/hooks/use-multiple-select";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
@@ -26,6 +26,7 @@ import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
import { IssueIdentifier } from "@/plane-web/components/issues";
|
||||
// local components
|
||||
import { TRenderQuickActions } from "../list/list-view-types";
|
||||
import { isIssueNew } from "../utils";
|
||||
import { IssueColumn } from "./issue-column";
|
||||
|
||||
interface Props {
|
||||
@@ -42,6 +43,7 @@ interface Props {
|
||||
spreadsheetColumnsList: (keyof IIssueDisplayProperties)[];
|
||||
spacingLeft?: number;
|
||||
selectionHelpers: TSelectionHelper;
|
||||
shouldRenderByDefault?: boolean;
|
||||
}
|
||||
|
||||
export const SpreadsheetIssueRow = observer((props: Props) => {
|
||||
@@ -59,11 +61,14 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
|
||||
spreadsheetColumnsList,
|
||||
spacingLeft = 6,
|
||||
selectionHelpers,
|
||||
shouldRenderByDefault,
|
||||
} = props;
|
||||
// states
|
||||
const [isExpanded, setExpanded] = useState<boolean>(false);
|
||||
// store hooks
|
||||
const { subIssues: subIssuesStore } = useIssueDetail();
|
||||
const { issueMap } = useIssues();
|
||||
|
||||
// derived values
|
||||
const subIssues = subIssuesStore.subIssuesByIssueId(issueId);
|
||||
const isIssueSelected = selectionHelpers.getIsEntitySelected(issueId);
|
||||
@@ -88,6 +93,7 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
|
||||
})}
|
||||
verticalOffset={100}
|
||||
shouldRecordHeights={false}
|
||||
defaultValue={shouldRenderByDefault || isIssueNew(issueMap[issueId])}
|
||||
>
|
||||
<IssueRowDetails
|
||||
issueId={issueId}
|
||||
@@ -124,6 +130,7 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
|
||||
containerRef={containerRef}
|
||||
spreadsheetColumnsList={spreadsheetColumnsList}
|
||||
selectionHelpers={selectionHelpers}
|
||||
shouldRenderByDefault={isExpanded}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user