Skip to content

Commit

Permalink
Fix More Filter popover overlay height
Browse files Browse the repository at this point in the history
  • Loading branch information
spnayan committed Apr 29, 2024
1 parent a8bce27 commit c10fa27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/views/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ export const MoreFilters = () => {

const { top, left, height, width } = filterElement.getBoundingClientRect();
const { height: containerHeight } = projectContainerElement.getBoundingClientRect();
setScrollHeight(window.scrollY);
setProjectContainerHeight(containerHeight);
const navbarHeight = document.getElementById('explore-nav').offsetHeight;
// calculate difference between explore project page and navbar to set popover overlay height
setProjectContainerHeight(containerHeight - navbarHeight);
setPosition({ top, left, height, width });
setScrollHeight(window.scrollY);
}, [filterElement, width, projectContainerElement]);

console.log(scrollHeight, 'scroll height');

useEffect(() => {
const contentHeight =
document.getElementById('explore-nav').offsetHeight +
Expand Down

0 comments on commit c10fa27

Please sign in to comment.