Skip to content

Commit

Permalink
constrain height
Browse files Browse the repository at this point in the history
  • Loading branch information
dagda1 committed Oct 4, 2022
1 parent 6ef7857 commit b2d1610
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export function DynamicRowVirtualizer(
getScrollElement: () => expanderRef.current,
// we need useCallback to force the update
estimateSize: useCallback(() => nodes[0].fields.length * RowSize, [update]),
overscan: 3,
enableSmoothScroll: false,
getItemKey: (index) => nodes[index].id,
// nuking this for now. Default does too much
Expand Down Expand Up @@ -58,7 +57,7 @@ export function DynamicRowVirtualizer(
<div
ref={expanderRef}
style={{
height: "800px",
height: `${window.innerHeight - 250}px`,
width: `100%`,
overflow: "auto",
}}
Expand Down
2 changes: 2 additions & 0 deletions cli/graphql/relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ function applyCursorsToEdges<T>(nodes: T[], before?: string, after?: string) {
const afterIdx = !!after ? Number(after) : -1;
const beforeIdx = !!before ? Number(before) : nodes.length;

console.log({afterIdx, beforeIdx});

const edges = nodes.slice(afterIdx + 1, beforeIdx).map((node, i) => ({
node,
cursor: (afterIdx + 1 + i).toString(),
Expand Down

0 comments on commit b2d1610

Please sign in to comment.