diff --git a/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php b/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php index 6ca9b208..476920a8 100644 --- a/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php +++ b/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php @@ -233,8 +233,8 @@ protected function matchSuggestion($path, $label, $searchTerm) { if (preg_match('/[_.](id)$/', $path)) { // Only suggest exotic columns if the user knows about them - $trimmedSearch = trim($searchTerm, ' *'); - return substr($path, -strlen($trimmedSearch)) === $trimmedSearch; + + return substr($path, strrpos($path, '.') + 1) === trim($searchTerm, ' *'); } return parent::matchSuggestion($path, $label, $searchTerm);