Start Tab Panel collapsed in BAP

Hi, is it possible to open the “Tab Panel” in the a12 client in collapsed mode? Configuration options are “minimized”, “maximized” and undefined as far as I can see, and none of those show the panel in it’s collapsed state initially. You always have to close the panel manually.

<INTERNAL_LINK>

Hi,
yes it is possible to open the sidebar in a collapsed state.
There are two properties, that are responsible for the state of sidebar:

  • subExpandedState (The property you were referring to): Whether the sidebar will be maximized or minimized, when expanded
  • subExpanded: Whether the sidebar will be epxanded or collapsed

Setting subExpanded to false initially should lead to the desired behaviour

subExpanded is a property of FrameViews.SidebarContext and can not be set in the appmodel but only using React.useContext inside a functional component, therefore only during rendering. I can therefore not set an initial state using that.

In my opinion it should be sufficient to set subExpanded to false after the first render using React.useEffect and an additional flag, that tracks, if the component has already been initialized.

I enhanced the application frame layout example in our sample application accordingly. You can check out the code [here]<INTERNAL_LINK>

It’s not sufficient as you can see the closing animation for the panel. I will create a bug ticket for this.