Move(Hide or Show) Searchbar in Map

Hello guys, I would like to move the searchbar to up, when I use dragdrop in maps, how to do its…when drags the map the searchbar up when drops searchbar down (Hide or Show)

something like for example

dragdropMap() {
    drag.map = up+hide searchbar
    drop.map = down+show searchbar
}