Skip to content

Commit

Permalink
Added 'searchBarRows' configuration in filament-laravel-log.php and u…
Browse files Browse the repository at this point in the history
…pdated ViewLog.php to dynamically use this value in the search bar

- Introduced new 'searchBarRows' configuration setting to define the number of rows in the search bar.
- Modified ViewLog.php to dynamically retrieve and utilize the 'searchBarRows' value from the configuration file, replacing the previous static value.
  • Loading branch information
albertofuentes committed Feb 23, 2024
1 parent f4fc980 commit 75df530
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config/filament-laravel-log.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@
* Editor font size.
*/
'fontSize' => 12,

/**
* Number of rows in the search bar
*/
'searchBarRows' => 5,
];
2 changes: 1 addition & 1 deletion src/Pages/ViewLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function form(Form $form): Form
->placeholder(fn (): string => __('log::filament-laravel-log.page.form.placeholder'))
->live()
->options(
fn () => $this->getFileNames($this->getFinder())->take(5)
fn () => $this->getFileNames($this->getFinder())->take(config('filament-laravel-log.searchBarRows'))
)
->searchable()
->getSearchResultsUsing(
Expand Down

0 comments on commit 75df530

Please sign in to comment.