Skip to content

Commit

Permalink
Merge pull request #7 from pxlrbt/fix/use-render-hook
Browse files Browse the repository at this point in the history
Use render hook for Livewire component
  • Loading branch information
pxlrbt committed Aug 2, 2022
2 parents 64b19f4 + 51d347d commit de9fa2f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
],
"require": {
"php": "^8.0",
"filament/filament": "^2.10.34",
"filament/filament": "^2.14.0",
"wire-elements/spotlight": "^1.0",
"spatie/laravel-package-tools": "^1.11",
"spatie/invade": "^1.0"
"spatie/laravel-package-tools": "^1.11"
},
"autoload": {
"psr-4": {
Expand Down
13 changes: 0 additions & 13 deletions src/Actions/InjectSpotlightComponent.php

This file was deleted.

6 changes: 3 additions & 3 deletions src/FilamentSpotlightServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
use Filament\Events\ServingFilament;
use Filament\Facades\Filament;
use Filament\PluginServiceProvider;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Event;
use pxlrbt\FilamentSpotlight\Actions\InjectSpotlightComponent;
use pxlrbt\FilamentSpotlight\Actions\RegisterPages;
use pxlrbt\FilamentSpotlight\Actions\RegisterResources;
use pxlrbt\FilamentSpotlight\Actions\RegisterUserMenu;
use Spatie\LaravelPackageTools\Package;

class FilamentSpotlightServiceProvider extends PluginServiceProvider
{
public static string $name = 'Filament Spotlight';
public static string $name = 'filament-spotlight';

protected array $styles = [
'spotlight' => __DIR__ . '/../resources/dist/css/spotlight.css',
Expand Down Expand Up @@ -43,6 +43,6 @@ public function registerSpotlight(ServingFilament $event): void
(new RegisterResources())();
(new RegisterUserMenu())();

(new InjectSpotlightComponent())();
Filament::registerRenderHook('scripts.end', fn () => Blade::render("@livewire('livewire-ui-spotlight')"));
}
}

0 comments on commit de9fa2f

Please sign in to comment.