mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 03:29:25 +01:00
fix(EasySetup): scroll to top when navigating between steps
Adds a useEffect that smoothly scrolls the window to the top whenever the wizard step changes. This ensures users always see the beginning of each step content rather than remaining scrolled down from the previous step. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
2c4fc59428
commit
738b57e854
|
|
@ -453,6 +453,11 @@ export default function EasySetupWizard(props: { system: { services: ServiceSlim
|
|||
},
|
||||
})
|
||||
|
||||
// Scroll to top when step changes
|
||||
useEffect(() => {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
}, [currentStep])
|
||||
|
||||
// Auto-fetch latest collections if the list is empty
|
||||
useEffect(() => {
|
||||
if (mapCollections && mapCollections.length === 0 && !fetchLatestMapCollections.isPending) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user