Create override function for click event in search.