UI5 Table Column Headers disappear after navigation
I have a weird problem where in my UI5 application after some navigation (sliding back and forth) the column headers of my table (sap.ui.table.Table) are missing. After F5 it comes back again and is displayed normally.
I pinpointed the cause of this: When navigating from the view where the table is located while the scroll-bar is not at its initial position (see blue line in the picture above) then the column headers go bananas and the scroll-bar is still positioned at the same spot prior to navigating away from that view where the table was.
The table itself is created once, the contents are refreshed, thus I am not creating the table over and over again. Is there a way to position the scroll-bar back to its initial position before navigating away or can I refresh/redraw the whole table including its scroll-bars?
PS: This is a weird bug!
Finally figured out the required sap generated runtime component to apply the bellow command to:
document.getElementById("<your_table_id>-hsb-sb").scrollLeft = 0;