Skip to content

Commit

Permalink
ntp: fix favorites container when expanded+few items (#1306)
Browse files Browse the repository at this point in the history
Co-authored-by: Shane Osbourne <[email protected]>
  • Loading branch information
shakyShane and Shane Osbourne authored Dec 6, 2024
1 parent 9322e51 commit dc52beb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ function VirtualizedGridRows({ WIDGET_ID, rowHeight, favorites, expansion, openF
// get a ref for the favorites' grid, this will allow it to receive drop events,
// and the ref can also be used for reading the offset (eg: if other elements are above it)
const safeAreaRef = /** @type {import("preact").RefObject<HTMLDivElement>} */ (useDropzoneSafeArea());
const containerHeight = expansion === 'collapsed' ? rowHeight : rows.length * rowHeight;

// prettier-ignore
const containerHeight = expansion === 'collapsed' || rows.length === 0
? rowHeight
: rows.length * rowHeight;

return (
<div
Expand Down

0 comments on commit dc52beb

Please sign in to comment.