Skip to content

Commit a4fb675

Browse files
committed
Merge branch 'main' into dev
2 parents 2149075 + d234a99 commit a4fb675

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
88

9+
## [1.1.1] - 2025-05-15
10+
11+
### Fixed
12+
13+
- Fix fuzzy match highlight.
14+
915
## [1.1.0] - 2025-05-15
1016

1117
_Stable release based on [1.1.0-rc.1]._
@@ -348,6 +354,7 @@ _Stable release based on [0.1.0-rc.1]._
348354
- New changelog file.
349355

350356
[Unreleased]: https://https://github.com/internetguru/laravel-model-browser/compare/staging...dev
357+
[1.1.1]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.1.0...v1.1.1
351358
[1.1.0]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.0.3...v1.1.0
352359
[1.1.0-rc.1]: https://github.com/internetguru/laravel-model-browser/releases/tag/v1.0.3
353360
[1.0.3]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.0.2...v1.0.3

src/Traits/HighlightMatchesTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ protected function highlightMatches($data, string $filter, array $filterAttribut
2828
foreach ($filterAttributes as $attribute) {
2929
$originalValue = $item->{$attribute . 'Formatted'} ?? $item->{$attribute};
3030

31+
if (! $exactMatch) {
32+
$normalizedFilter = trim($normalizedFilter);
33+
}
34+
3135
if ($exactMatch && $normalizedFilter == '') {
3236
// Exact match with empty string
3337
$item->{$attribute . 'Highlighted'} = $originalValue == '' ? '<mark></mark>' : $originalValue;

0 commit comments

Comments
 (0)