diff --git a/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php b/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php index 6ca9b208c..f6e4041f2 100644 --- a/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php +++ b/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php @@ -99,8 +99,12 @@ protected function createQuickSearchFilter($searchTerm) protected function fetchValueSuggestions($column, $searchTerm, Filter\Chain $searchFilter) { $model = $this->getModel(); - $query = $model::on(Database::get()); - $query->limit(static::DEFAULT_LIMIT); + $query = $model::on(Database::get()) + ->limit(static::DEFAULT_LIMIT); + + if (in_array('deleted', $model->getColumns())) { + $query->filter(Filter::equal('deleted', 'n')); + } if (strpos($column, ' ') !== false) { // $column may be a label