Skip to content

[ObjectPage]: call toggleHeaderArea(false) immediately after ObjectPage mounted will add extra top space to tab content #7527

@Mipaprika

Description

@Mipaprika

Describe the bug

We have a feature that the selected tab should be stored in the url, and if certain tab is selected we should collapse the header area, so after the component is mounted we will call toggleHeaderArea() to set the collapse status of the header area.

The issue is when we load the page, if the selected tab do not need to collapse the header area, that is to call toggleHeaderArea(false), there will an extra space at the top of the tab content:

Image

Since this issue only happens when call toggleHeaderArea(false) and everything goes well when call toggleHeaderArea(true), besides the default status is not collapsed, so there is a workaround that if the selected tab doesn't need the header area collapsed then do not call this function. But I think this may still be a bug to be fixed so raise this issue.

Isolated Example

https://stackblitz.com/edit/github-zavsmr2v?file=src%2FApp.tsx

Reproduction steps

  1. Just open the standalone example you will see the extra space as shown in the screenshot above.

Expected Behaviour

Remove the extra space.

Screenshots or Videos

No response

UI5 Web Components for React Version

2.12.0

UI5 Web Components Version

2.12.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions