odoo/o-spreadsheet#7914

Created by Ronakkumar Mukeshbhai Bharadiya (rmbh)
Merged at e0169c65076313f515f6eb854d90dba5c9b8c750

Statuses:

label
odoo:saas-19.1-fix-side-panel-tab-save-scroll-state-rmbh
head
c784fd0e499a7487e35072c28a5788c221e66556
merged
1 week ago by BI, Rémi Rahir (rar)
odoo/o-spreadsheet
saas-19.1 #7914
saas-19.2 #7985
master #7987

[FIX] side_panel: scroll state issue in chart and pivot side panel

Description:

This PR includes the following fixes:
[FIX] side_panel: restore vertical scrolling for chart side panel tabs
[FIX] side_panel: restore scroll position on pivot tab change

Current behavior before PR:
- Commit d04cafc9288bd2df01f6b62abea1e267ddaf873d accidentally removed overflow-y-auto from the chart side panel content, causing the whole panel to scroll and breaking the sticky tab behavior.
- In the pivot side panel, the scrollTop value was stored when switching tabs but never reapplied to the DOM.

Desired behavior:
- Restore overflow-y-auto on the chart side panel content so the tab header stays sticky while the content scrolls.
- Apply the saved scrollTop value when switching pivot side panel tabs using a useEffect hook.

Task: 5900595

review checklist

  • [ ] feature is organized in plugin, or UI components
  • [ ] support of duplicate sheet (deep copy)
  • [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • [ ] in model/UI: ranges are strings (to show the user)
  • [ ] undo-able commands (uses this.history.update)
  • [ ] multiuser-able commands (has inverse commands and transformations where needed)
  • [ ] new/updated/removed commands are documented
  • [ ] exportable in excel
  • [ ] translations (_t("qmsdf %s", abc))
  • [ ] unit tested
  • [ ] clean commented code
  • [ ] track breaking changes
  • [ ] doc is rebuild (npm run doc)
  • [ ] status is correct in Odoo