Add callback to disable a search when the search mode is disabled.