React SearchBox - Close results ( hits ) onfocusout or on body click

I’m using react SearchBox component. show can i close hits when i click on any body element or focus is taken out of the searchbox, i have setup in such a way that when i search hits appear inside a box near to searchbox, when i remove everything typed from searchbox input, hits closes automatically, how to get this closing functionality when i click anywhere in the body even if i have a typed something to search in the searchbox ?