Adjust height of API index in sidebar according to window height