Show search action only when required

Signed-off-by: Umair Khan <omerjerk@gmail.com>