Tenebrius Etignis
Tenebrius Etignis

Reputation: 15

Why table column headers change their width&

I open one table in the dialog window. And it looks like this: Normal table

But if I close the dialog and reopen it, table column headers becomes more narrow like this: Strange table

When I resize column width, headers become normal.

I use code from example SAPUI5 Explored | Grid Table (sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.table.sample.Basic/code/View.view.xml)

<t:Table
            rows="Data>/Table}"
            class="sapUiSmallMargin"
            selectionMode="None"
            enableSelectAll="false"
            visibleRowCount="17">
            <t:columns>
                <t:Column
                    showFilterMenuEntry="false"
                    showSortMenuEntry="false"
                    width="3rem">
                    <Label text="Num" />
                    <t:template>
                        <Text text="{Data>Row}"/>
                    </t:template>
                </t:Column>
                ...

And I can't understand, what is the problem. Any ideas?

Upvotes: 0

Views: 573

Answers (1)

Dani&#235;l Camps
Dani&#235;l Camps

Reputation: 1809

I have come across this myself as well in certain browsers (Chrome), but not in others (such as IE11).

I believe that this is a browser-specific SAPUI5 rendering problem, and not a mistake in your coding.

If you do not set the width of the column manually, it will probably work just fine. If this is unacceptable, your could manually have the table to rerender once (just like what happens when you drag the width of the column).

Upvotes: 0

Related Questions