fix(core): optimize settings dialog's right-side content scroll position (#13236)

In the settings dialog, when switching between different setting items,
the right-side content retains the previous scroll position. I think it
would be better for the right side to return to the top every time a
switch is made, so I submitted this PR.

**before**


https://github.com/user-attachments/assets/a2d10601-6173-41d3-8d68-6fbccc62aaa7


**after**


https://github.com/user-attachments/assets/f240348b-e131-4703-8232-1a07e924162d



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Ensured the settings dialog always scrolls to the top when the
settings state updates, improving user experience when navigating
settings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
This commit is contained in:
Kieran Cui
2025-10-01 22:52:39 +08:00
committed by GitHub
parent 5fdae9161a
commit 856b69e1f6

View File

@@ -190,6 +190,7 @@ const SettingModalInner = ({
}
});
}
modalContentWrapperRef.current?.scrollTo({ top: 0 });
}, [settingState]);
return (
<FrameworkScope scope={currentServer.scope}>