cancel
Showing results for 
Search instead for 
Did you mean: 

Scrolling issue Scroll container + Timeline

siarhei_valenda
Employee
Employee
0 Kudos

Hi,

I have an issue with Timeline control nested in ScrollContainer (see below). After I trigger visibility of this control (via a separate viewModel) it starts to show strange vertical/horizontal scrollbars. When I navigate back to the previous screen and again to this one, the issue dissapears.

Code:


<ScrollContainer

  horizontal="true"

  vertical="false">

       <layoutData>

            <l:GridData

                 span="L9 M7 S6">

            </l:GridData>

       </layoutData>

       <s:Timeline

            id="Timeline"

            axisOrientation="Horizontal"

            enableScroll="false"

            showHeaderBar="false"

            visible="{objectView>/headerExpanded}"

            enableAllInFilterItem="false"

            select="onChangeNumberPress">

Any possible workaround here? I seems like I need to call something like "redraw" method of the control, but there is no such methods for UI5.

Thank you in advance

BR,

Siarhei

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Siarhei,

I have been trying out the Timeline Controll recently and I noticed that it grows longer and it doesn't look that good.

So like you did, I also tried with ScrollContainer or Vertical/HorizontalLayout to kind of limit its size but it didn't work really well so I checked the generated HTML Code and noticed that you can limit its size by adding this in a css file:

.sapSuiteUiCommonsTimelineScroll{

  height:300px;

}

Then you can add more items and it will use its own scroll.

The Timeline XML looks like this:

<c:Timeline id="idTimeline" growing="true" showHeaderBar="false"

growingThreshold="3" enableAllInFilterItem="false">

</c:Timeline>

Hope this helps you or someone else.

Regards,

Ilina