David Vincent
DeleteBulkAction and ForceDeleteBulkAction policies
I had a look to the code of those 2 actions and I don't see any check if the user is authorized or not to delete or forceDelete the record. Is it managed somewhere else ? If not, as all FI stuff remains on authorisations and policies, does it make sense to check that in the process of those actions. I also understand that table builder can also be used outside of filament admin panel, so does is means we have to customise each process to check authorisation ?
26 replies
Plugin dev
Hi, I am working locally on a plugin which has assets. So in the provider I have
FilamentAsset::register([
Css::make('filament-nested-list-styles', __DIR__ . '/../resources/dist/filament-nested-list.css')->loadedOnRequest(),
Js::make('filament-nested-list-scripts', __DIR__ . '/../resources/dist/filament-nested-list.js'),
], 'invaders-xx/filament-nested-list');
in packageBooted function. Those file exists on disk but when I do a in the view, the system does not find the css file. Did I miss smth ? Thanks6 replies
Nested Sortable
I tried to use an existing plugin to manage tree structure (ie : solutionforest/filament-tree), but this pluging implements jquery to manage drag/drop of nested elements. it works fine but in a fantastic framework like Filament which only implements alpinejs and Vanilla JS stuff, I think it's a shame to use JQuery, not to mention the conflicts and errors generated in the console be using it. So I set out to use Sortable, which is already part of Filament, but I'm faced with the problem of nested lists, Sortable is perfect for sorting in a list but doesn't seem to work for nested lists. Has anyone ever used Sortable for nested lists? Thanks in advance for your feedback.
3 replies
wire-elements-modal issue
I implemented wire-elements-modal and it works fine except that I am not able to adjust the size of the modal as mentioned in the doc. I created a Filament theme as described in the the docs and then add in tailwind.config.js of the theme, but the modals are always with same size even if I change it in the component. Does anyone made it working properly within filament ?
15 replies
emitSelf
I am not able to make ->emitSelf() working from a button within a notification. The event is never trigger. If I use ->emit() it works, but that's not the behaviour I want as I have other livewire components listening to this event on the same page. Any thoughts? Issue already figured out ? Thanks for feedback and help
26 replies
afterStateHydrated behavior within Block builder
I have an TextInput field within a Block, and I would like to fill it with uuid when it's empty. I am doing that:
Forms\Components\TextInput::make('internal')
->afterStateHydrated(function ($component, $state) {
if (! $state) {
$component->state(Str::uuid()->toString());
}
})
->disabled()
->suffixAction(CopyAction::make())
->dehydrateStateUsing(fn ($state) => $state ?? Str::uuid()->toString()),
But it's not working. Any thoughts?7 replies
TableHeaderActions
I have a simple TableHeaderActions within a Table livewire component:
$this->getFormSchema() returns an array of form's fields.
When I click the button, the loading indicator is shown, but no modal opens, did I miss smth ?
5 replies