mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
ui(settings): restore scroll synchronously to prevent flicker; dx(ui): name TabContent for clearer DevTools
This commit is contained in:
parent
ad07bf4e0d
commit
36489418a7
2 changed files with 5 additions and 6 deletions
|
|
@ -45,6 +45,7 @@ export const TabContent = forwardRef<HTMLDivElement, TabProps>(({ className, chi
|
|||
</div>
|
||||
)
|
||||
})
|
||||
TabContent.displayName = "TabContent"
|
||||
|
||||
export const TabList = forwardRef<
|
||||
HTMLDivElement,
|
||||
|
|
|
|||
|
|
@ -411,12 +411,10 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
|
|||
[activeTab],
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
requestAnimationFrame(() => {
|
||||
if (contentRef.current) {
|
||||
contentRef.current.scrollTop = scrollPositions.current[activeTab] ?? 0
|
||||
}
|
||||
})
|
||||
useLayoutEffect(() => {
|
||||
if (contentRef.current) {
|
||||
contentRef.current.scrollTop = scrollPositions.current[activeTab] ?? 0
|
||||
}
|
||||
}, [activeTab])
|
||||
|
||||
// Store direct DOM element refs for each tab
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue