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:
@@ -190,6 +190,7 @@ const SettingModalInner = ({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
modalContentWrapperRef.current?.scrollTo({ top: 0 });
|
||||||
}, [settingState]);
|
}, [settingState]);
|
||||||
return (
|
return (
|
||||||
<FrameworkScope scope={currentServer.scope}>
|
<FrameworkScope scope={currentServer.scope}>
|
||||||
|
|||||||
Reference in New Issue
Block a user