Skip to content

Commit 3017782

Browse files
committed
Remove fixed height of 500px when there are no rows to render
1 parent 9f7642d commit 3017782

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/dataframe/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,11 @@ const ShinyDataGrid: FC<ShinyDataGridProps<unknown>> = (props) => {
374374
const headerRowCount = table.getHeaderGroups().length;
375375

376376
// Assume we're scrolling until proven otherwise
377-
let scrollingClass = "scrolling";
377+
let scrollingClass = "";
378378
const scrollHeight = containerRef.current?.scrollHeight;
379379
const clientHeight = containerRef.current?.clientHeight;
380-
if (scrollHeight && clientHeight && scrollHeight <= clientHeight) {
381-
scrollingClass = "";
380+
if (scrollHeight && clientHeight && scrollHeight > clientHeight) {
381+
scrollingClass = "scrolling";
382382
}
383383

384384
const makeHeaderKeyDown =

0 commit comments

Comments
 (0)