Expand/collapse functionality for searchbar