- Ensured that the search bar gets hidden properly when the view changes