Renan Pereira
Renan Pereira
FFilament
Created by Renan Pereira on 10/21/2024 in #❓┊help
Modal not working on Firefox
We "fixed" by applying the code below {{-- Corrigir o problema no Firefox --}} {{-- Too many calls to location or history APIs in a short period of time. --}} <script> const original = window.history.replaceState; let timer = Date.now(); let timeout = null; let lastArgs = null; window.history.replaceState = function (...args) { const time = Date.now(); if (time - timer < 300) { lastArgs = args; if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { original.apply(this, lastArgs); timeout = null; lastArgs = null; }, 100); return; } timer = time; original.apply(this, args); }; </script>
16 replies
FFilament
Created by Renan Pereira on 10/21/2024 in #❓┊help
Modal not working on Firefox
Yes, specific to modals
16 replies
FFilament
Created by Renan Pereira on 10/21/2024 in #❓┊help
Modal not working on Firefox
No description
16 replies
FFilament
Created by Renan Pereira on 10/21/2024 in #❓┊help
Modal not working on Firefox
Error message:
16 replies
FFilament
Created by Hurruwa on 7/22/2024 in #❓┊help
ExportAction export different model
Any update on this?
15 replies
FFilament
Created by Butterfly on 3/11/2024 in #❓┊help
Passing props to a custom column
After a lot of digging, I had to do it in the view of my component, so in the end you have a $getTitle() for it to work. Probably because of the evaluate function that handles the data.
10 replies
FFilament
Created by Butterfly on 3/11/2024 in #❓┊help
Passing props to a custom column
As I want to reuse this column, I prefer to pass it as a parameter. In the TextColumn I can use formatStateUsing(fn ($record) => $record)
10 replies
FFilament
Created by Butterfly on 3/11/2024 in #❓┊help
Passing props to a custom column
Hi, how can I pass the instance of the record as a parameter. Say I wanted to passar the current record as title
10 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
Yeah, I'll try that. Thanks for the help !!
20 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
That was it, the request() is different when I click on the edit action
20 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
Could it be that on the reaload the route is different somehow?
20 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
I removed the Auth verification to test if that was the issue, but it still remains
20 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
No errors in the console
20 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
if (request()->routeIs('funcionarios.index')) { return true; }
20 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
This is the condition it is returning as true
20 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
Right, I'll think about replacing it later as better practice, but it isn't even entering this condition
20 replies
FFilament
Created by Renan Pereira on 7/9/2024 in #❓┊help
EditAction enabling hidden CreateAction in headerActions
CreateAction::make() ->icon('heroicon-c-plus') ->label('Adicionar') ->color('success') ->hidden(function () { if (!Auth::user()->can('edit_empresas')) { return true; } if (request()->routeIs('funcionarios.index')) { return true; } })
20 replies
FFilament
Created by Renan Pereira on 6/5/2024 in #❓┊help
Export Column State Not Working
I did not know this... been searching for a Filament problem but was a Laravel issue. Thanks again !!
19 replies
FFilament
Created by Renan Pereira on 6/5/2024 in #❓┊help
Export Column State Not Working
Yes, this worked. I'm using database. Thank you so much!
19 replies
FFilament
Created by Renan Pereira on 6/5/2024 in #❓┊help
Export Column State Not Working
I tried on both, ExportAction and ExportBulkAction, none where working ->headerActions([ Action::make('create') ->label('Adicionar') ->icon('heroicon-c-plus') ->color('success') ->hidden(!\Auth::user()->can('add_new_docto_empresa')) ->extraAttributes([ 'class' => 'p-2 bg-success text-white text-lg', ]) ->url(fn (): string => route('empresas.doctos.create', $this->empresa->id)), ExportAction::make() ->exporter(EmpresaDoctoExporter::class) ->label('Exportar') ->color('info') ->icon('heroicon-s-arrow-down-tray') ]) ->bulkActions([ ExportBulkAction::make() ->exporter(EmpresaDoctoExporter::class) ->label('Exportar') ->color('info') ->icon('heroicon-s-arrow-down-tray')
19 replies