Skip to content

Commit

Permalink
Added loading indicator to ListEmail for large datasets. Updated deps…
Browse files Browse the repository at this point in the history
…. Minor fixes to PHPUnit config.
  • Loading branch information
Marco Germani committed Nov 1, 2024
1 parent 7f51b5e commit 533a152
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"require": {
"php": "^8.1",
"filament/filament": "^3.0",
"filament/filament": "^3.2",
"illuminate/contracts": "^10.0|^11.0",
"laravel/framework": "^10.0|^11.0",
"spatie/laravel-package-tools": "^1.14.0",
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
<env name="APP_KEY" value="base64:TjUDOagJgL6S+vrTYVM5PnIgfMzI6ECTz5GCrspaVSQ="/>
<env name="MAIL_MAILER" value="log"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
</php>
<source>
<include>
Expand Down
10 changes: 10 additions & 0 deletions src/FilamentEmailServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

namespace RickDBCN\FilamentEmail;

use Filament\Support\Facades\FilamentView;
use Filament\Tables\View\TablesRenderHook;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Support\Facades\Blade;
use RickDBCN\FilamentEmail\Filament\Resources\EmailResource\Pages\ListEmails;
use RickDBCN\FilamentEmail\Models\Email;
use RickDBCN\FilamentEmail\Providers\EmailMessageServiceProvider;
use Spatie\LaravelPackageTools\Package;
Expand Down Expand Up @@ -35,6 +39,12 @@ public function configurePackage(Package $package): void

public function bootingPackage()
{
FilamentView::registerRenderHook(
TablesRenderHook::TOOLBAR_SEARCH_BEFORE,
fn (): string => Blade::render('<x-filament::loading-indicator wire:loading class="ml-3 h-5 w-5" />'),
scopes: ListEmails::class
);

$pruneEnabled = config('filament-email.prune_enabled') ?? false;

if ($pruneEnabled) {
Expand Down

0 comments on commit 533a152

Please sign in to comment.