set initial state on showSearch properly