That would work. I originally had the searchbar below the categories menu, and having it there was much easier.
When I went to move it into the categories menu, this is the way originally figured out to do it.