Reset scroll on active group change

pull/5425/head^2
Kamran Ahmed 8 months ago
parent 4988ba0604
commit d3ee18e2a1
  1. 7
      src/components/Roadmaps/RoadmapsPage.tsx

@ -392,12 +392,6 @@ export function RoadmapsPage() {
const [isFilterOpen, setIsFilterOpen] = useState(false);
useEffect(() => {
if (!isFilterOpen) {
document?.getElementById('filter-button')?.bringIntoView();
}
}, [isFilterOpen]);
useEffect(() => {
if (!activeGroup) {
setVisibleGroups(allGroups);
@ -475,6 +469,7 @@ export function RoadmapsPage() {
onClick={() => {
setActiveGroup(group.group);
setIsFilterOpen(false);
document?.getElementById('filter-button')?.scrollIntoView();
}}
category={group.group}
selected={activeGroup === group.group}

Loading…
Cancel
Save