search bar adapts to the current view