tweak pagination and virtualization thresholds to have a smoother scroll (#4991)
This commit is contained in:
parent
12401c54cc
commit
c637639a3e
6 changed files with 7 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ export const IssueGanttSidebar: React.FC<Props> = observer((props) => {
|
||||||
ganttContainerRef,
|
ganttContainerRef,
|
||||||
isPaginating ? null : intersectionElement,
|
isPaginating ? null : intersectionElement,
|
||||||
loadMoreBlocks,
|
loadMoreBlocks,
|
||||||
"50% 0% 50% 0%"
|
"100% 0% 100% 0%"
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleOnDrop = (
|
const handleOnDrop = (
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,8 @@ export const KanbanIssueBlock: React.FC<IssueBlockProps> = observer((props) => {
|
||||||
classNames="space-y-2 px-3 py-2"
|
classNames="space-y-2 px-3 py-2"
|
||||||
root={scrollableContainerRef}
|
root={scrollableContainerRef}
|
||||||
defaultHeight="100px"
|
defaultHeight="100px"
|
||||||
horizontalOffset={50}
|
horizontalOffset={100}
|
||||||
|
verticalOffset={200}
|
||||||
>
|
>
|
||||||
<KanbanIssueDetailsBlock
|
<KanbanIssueDetailsBlock
|
||||||
cardRef={cardRef}
|
cardRef={cardRef}
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ export const IssueBlockRoot: FC<Props> = observer((props) => {
|
||||||
defaultHeight="3rem"
|
defaultHeight="3rem"
|
||||||
root={containerRef}
|
root={containerRef}
|
||||||
classNames={`relative ${isLastChild && !isExpanded ? "" : "border-b border-b-custom-border-200"}`}
|
classNames={`relative ${isLastChild && !isExpanded ? "" : "border-b border-b-custom-border-200"}`}
|
||||||
|
verticalOffset={100}
|
||||||
>
|
>
|
||||||
<IssueBlock
|
<IssueBlock
|
||||||
issueId={issueId}
|
issueId={issueId}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ export const ListGroup = observer((props: Props) => {
|
||||||
const nextPageResults = getPaginationData(group.id, undefined)?.nextPageResults;
|
const nextPageResults = getPaginationData(group.id, undefined)?.nextPageResults;
|
||||||
const isPaginating = !!getIssueLoader(group.id);
|
const isPaginating = !!getIssueLoader(group.id);
|
||||||
|
|
||||||
useIntersectionObserver(containerRef, isPaginating ? null : intersectionElement, loadMoreIssues, `50% 0% 50% 0%`);
|
useIntersectionObserver(containerRef, isPaginating ? null : intersectionElement, loadMoreIssues, `100% 0% 100% 0%`);
|
||||||
|
|
||||||
const shouldLoadMore =
|
const shouldLoadMore =
|
||||||
nextPageResults === undefined && groupIssueCount !== undefined && groupIssueIds
|
nextPageResults === undefined && groupIssueCount !== undefined && groupIssueIds
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
|
||||||
"group selected-issue-row": isIssueSelected,
|
"group selected-issue-row": isIssueSelected,
|
||||||
"border-[0.5px] border-custom-border-400": isIssueActive,
|
"border-[0.5px] border-custom-border-400": isIssueActive,
|
||||||
})}
|
})}
|
||||||
|
verticalOffset={100}
|
||||||
>
|
>
|
||||||
<IssueRowDetails
|
<IssueRowDetails
|
||||||
issueId={issueId}
|
issueId={issueId}
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ export const SpreadsheetTable = observer((props: Props) => {
|
||||||
|
|
||||||
const isPaginating = !!getIssueLoader();
|
const isPaginating = !!getIssueLoader();
|
||||||
|
|
||||||
useIntersectionObserver(containerRef, isPaginating ? null : intersectionElement, loadMoreIssues, `50% 0% 50% 0%`);
|
useIntersectionObserver(containerRef, isPaginating ? null : intersectionElement, loadMoreIssues, `100% 0% 100% 0%`);
|
||||||
|
|
||||||
const handleKeyBoardNavigation = useTableKeyboardNavigation();
|
const handleKeyBoardNavigation = useTableKeyboardNavigation();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue