Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// SPDX-License-Identifier: Apache-2.0

import { DataTable, ScrollArea } from 'doodle-ui';
import { DataTable } from 'doodle-ui';
import fileDownload from 'js-file-download';
import { json2csv } from 'json-2-csv';
import { ChangeEvent, memo, useCallback, useMemo, useState } from 'react';
Expand Down Expand Up @@ -203,31 +203,33 @@ const ExploreTable = ({
resultsCount={resultsCount}
SearchInputProps={searchInputProps}
/>
<ScrollArea>
<MemoDataTable
TableHeaderProps={tableHeaderProps}
TableHeadProps={tableHeadProps}
TableProps={tableProps}
TableCellProps={tableCellProps}
columnPinning={columnPinning}
setColumnPinning={handleSetColumnPinning}
onRowClick={handleRowClick}
selectedRow={selectedItem || undefined}
data={sortedFilteredRows}
columns={tableColumns as DataTableProps['columns']}
tableOptions={tableOptions}
virtualizationOptions={virtualizationOptions}
columnSizing={columnSizing}
onColumnSizingChange={setColumnSizing}
columnOrder={columnOrder}
onColumnOrderChange={(newOrder) => {
setColumnOrder(newOrder);
}}
growLastColumn
enableResizing
enableDragAndDrop
/>
</ScrollArea>
<MemoDataTable
TableHeaderProps={tableHeaderProps}
TableHeadProps={tableHeadProps}
TableProps={tableProps}
TableCellProps={tableCellProps}
columnPinning={columnPinning}
setColumnPinning={handleSetColumnPinning}
onRowClick={handleRowClick}
selectedRow={selectedItem || undefined}
data={sortedFilteredRows}
columns={tableColumns as DataTableProps['columns']}
tableOptions={tableOptions}
virtualizationOptions={virtualizationOptions}
columnSizing={columnSizing}
onColumnSizingChange={setColumnSizing}
columnOrder={columnOrder}
onColumnOrderChange={(newOrder) => {
setColumnOrder(newOrder);
}}
className={cn('overflow-auto', {
// TODO: why is header disappearing on bottom scroll? One extra overflow element somewhere
'h-[calc(50vh-72px)]': !isExpanded,
'h-[calc(100vh-72px)]': !isExpanded,
})}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the expanded-height condition.

Line 228 repeats !isExpanded; twMerge leaves collapsed mode at h-[calc(100vh-72px)], while expanded mode gets no height class. This breaks the virtualization viewport in both states. Use isExpanded on line 228.

Proposed fix
                     className={cn('overflow-auto', {
                         // TODO: why is header disappearing on bottom scroll? One extra overflow element somewhere
                         'h-[calc(50vh-72px)]': !isExpanded,
-                        'h-[calc(100vh-72px)]': !isExpanded,
+                        'h-[calc(100vh-72px)]': isExpanded,
                     })}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/javascript/bh-shared-ui/src/components/ExploreTable/ExploreTable.tsx`
around lines 225 - 229, Update the height-class conditions in the ExploreTable
container’s cn call so the 100vh height uses isExpanded instead of repeating
!isExpanded. Preserve the existing collapsed height condition and ensure exactly
one viewport height class applies in each state.

growLastColumn
enableResizing
/>
</div>
</div>
);
Expand Down
Loading