David Vincent
David Vincent
FFilament
Created by David Vincent on 5/6/2024 in #❓┊help
Default MorphToSelect value
Is there a way to set a default value (model and id) for MorphToSelect field, I tried ->default($model) but it does not work. Any thoughts how to handle that ?
2 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
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
FFilament
Created by David Vincent on 4/23/2024 in #❓┊help
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
x-load-css="[@js(FilamentAsset::getStyleHref('filament-nested-list-styles', package: 'invaders-xx/filament-nested-list'))]"
x-load-css="[@js(FilamentAsset::getStyleHref('filament-nested-list-styles', package: 'invaders-xx/filament-nested-list'))]"
in the view, the system does not find the css file. Did I miss smth ? Thanks
6 replies
FFilament
Created by David Vincent on 4/22/2024 in #❓┊help
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
FFilament
Created by David Vincent on 3/28/2024 in #❓┊help
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
safelist: {
pattern: /max-w-(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl)/,
variants: ['sm', 'md', 'lg', 'xl', '2xl']
}
safelist: {
pattern: /max-w-(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl)/,
variants: ['sm', 'md', 'lg', 'xl', '2xl']
}
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
FFilament
Created by David Vincent on 5/16/2023 in #❓┊help
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
FFilament
Created by David Vincent on 5/15/2023 in #❓┊help
Navigation side menu on Android tablet issue
I am facing an issue on a Samsung tablet using chrome, the side bar menu items are not clickable. Did someone already face this issue ?
6 replies
FFilament
Created by David Vincent on 5/12/2023 in #❓┊help
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
FFilament
Created by David Vincent on 4/22/2023 in #❓┊help
Sticky form actions with HasWizard
11 replies
FFilament
Created by David Vincent on 4/1/2023 in #❓┊help
TableHeaderActions
I have a simple TableHeaderActions within a Table livewire component:
protected function getTableHeaderActions(): array
{
return [
Action::make('create')
->button()
->label(__('Create'))
->icon('heroicon-s-plus')
->visible(auth()->user()->can('core_create_field_type'))
->form($this->getFormSchema())
->action(function (array $data) {
ray($data);
}),
];

protected function getTableHeaderActions(): array
{
return [
Action::make('create')
->button()
->label(__('Create'))
->icon('heroicon-s-plus')
->visible(auth()->user()->can('core_create_field_type'))
->form($this->getFormSchema())
->action(function (array $data) {
ray($data);
}),
];

$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
FFilament
Created by David Vincent on 3/29/2023 in #❓┊help
Form Select options reload
Is there a way to send an event to a form select component to reload its options ? Or do I have to registerListeners for this specific select
12 replies
FFilament
Created by David Vincent on 3/13/2023 in #❓┊help
export Chart to image
Is there a way to export Chart graph as an image ?
2 replies
FFilament
Created by David Vincent on 3/13/2023 in #❓┊help
z-index on datepicker
10 replies
FFilament
Created by David Vincent on 3/2/2023 in #❓┊help
Livewire console error with version 2.17.10
26 replies