LeandroFerreira
LeandroFerreira
FFilament
Created by Glebka on 5/15/2025 in #❓┊help
How do I override getMaxContentWidth() globally?
I'm not the creator 😅 This is just a suggestion, and there may be other ways to achieve it..
11 replies
FFilament
Created by Glebka on 5/15/2025 in #❓┊help
How do I override getMaxContentWidth() globally?
@Glebka did you try it in 1 minute? 😂
11 replies
FFilament
Created by Glebka on 5/15/2025 in #❓┊help
How do I override getMaxContentWidth() globally?
I believe Filament uses xx.index for list pages. You could create a custom middleware and use something like this
public function handle(Request $request, Closure $next): Response
{
$currentPanel = filament()->getCurrentPanel();

if (str($request->route()->getAction('as'))->contains('index')) {
$currentPanel->maxContentWidth(MaxWidth::Full);
}

return $next($request);
}
public function handle(Request $request, Closure $next): Response
{
$currentPanel = filament()->getCurrentPanel();

if (str($request->route()->getAction('as'))->contains('index')) {
$currentPanel->maxContentWidth(MaxWidth::Full);
}

return $next($request);
}
$panel
...
->middleware([
...
CustomMiddleware::class
])
$panel
...
->middleware([
...
CustomMiddleware::class
])
11 replies
FFilament
Created by Asmit Nepali on 5/13/2025 in #❓┊help
Custom Action on custom column.
You could add an action to a livewire component https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component#adding-the-action Then, you can inject the component using a custom column
7 replies
FFilament
Created by TjardoOrtan on 5/13/2025 in #❓┊help
How can I conditionally show a confirmation modal during a resource edit form save.
I think you need to add submit(null) https://x.com/leandrocfe/status/1800169819880472924
5 replies
FFilament
Created by o.m on 5/13/2025 in #❓┊help
How do I add a custom label inside the header of table?
8 replies
FFilament
Created by o.m on 5/13/2025 in #❓┊help
How do I add a custom label inside the header of table?
feel free to submit prs and enhance docs 🤷‍♂️
8 replies
FFilament
Created by o.m on 5/13/2025 in #❓┊help
How do I add a custom label inside the header of table?
check TablesRenderHook
FilamentView::registerRenderHook(
TablesRenderHook::TOOLBAR_START, fn () => 'xxx'
);
FilamentView::registerRenderHook(
TablesRenderHook::TOOLBAR_START, fn () => 'xxx'
);
8 replies
FFilament
Created by Asmit Nepali on 5/13/2025 in #❓┊help
Custom Action on custom column.
why not just use an Action?
7 replies
FFilament
Created by moinmichi on 11/11/2024 in #❓┊help
Closing table action modal by another livewire component
why not modal form ?
5 replies
FFilament
Created by bernhard on 5/14/2025 in #❓┊help
Modal Action halt and autofocus
try this
->action(function (array $data, self $livewire, Action $action, Form $form) {
$form->fill();
$livewire->js("document.getElementById('{$form->getStatePath()}.code').focus()");
$action->halt();
}),
->action(function (array $data, self $livewire, Action $action, Form $form) {
$form->fill();
$livewire->js("document.getElementById('{$form->getStatePath()}.code').focus()");
$action->halt();
}),
4 replies
FFilament
Created by btx on 5/2/2025 in #❓┊help
Toggle default true
ok, but are you using the panel builder or only the form builder?
10 replies
FFilament
Created by btx on 5/2/2025 in #❓┊help
Toggle default true
is it a custom livewire component?
10 replies
FFilament
Created by btx on 5/2/2025 in #❓┊help
Toggle default true
default works in the CreatePage
10 replies
FFilament
Created by khairulazmi_ on 4/30/2025 in #❓┊help
Bind class on action button ?
I think you need to use ! to force the class and use HtmlString to Html content
8 replies
FFilament
Created by khairulazmi_ on 4/30/2025 in #❓┊help
Bind class on action button ?
no
8 replies
FFilament
Created by khairulazmi_ on 4/30/2025 in #❓┊help
Bind class on action button ?
try
'x-bind:class' => new HtmlString("{ '!bg-danger-100': selectedRecords.length === 0 }")
'x-bind:class' => new HtmlString("{ '!bg-danger-100': selectedRecords.length === 0 }")
Don't forget to create a custom theme and run npm run dev
8 replies
FFilament
Created by Liam on 4/15/2025 in #❓┊help
Open another form modal from a form modal
What about this?
public function createAction(): Action
{
return Action::make('create')
->form([
TextInput::make('token')
->required(),
])
->action(function (array $data) {

// Here you can handle the form submission

$this->replaceMountedAction('showToken', $data);
});
}

public function showTokenAction(): Action
{
return Action::make('showToken')
->fillForm(fn (array $arguments): array => [
'token' => $arguments['token'],
])
->form([
TextInput::make('token')
->disabled(),
])
->modalSubmitAction(false)
->modalCancelActionLabel('Close');
}
public function createAction(): Action
{
return Action::make('create')
->form([
TextInput::make('token')
->required(),
])
->action(function (array $data) {

// Here you can handle the form submission

$this->replaceMountedAction('showToken', $data);
});
}

public function showTokenAction(): Action
{
return Action::make('showToken')
->fillForm(fn (array $arguments): array => [
'token' => $arguments['token'],
])
->form([
TextInput::make('token')
->disabled(),
])
->modalSubmitAction(false)
->modalCancelActionLabel('Close');
}
11 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
In my opinion, you should review what changes have you made to the project. You could also create a new Filament project, using the same versions, with one resource and check if it happens.
16 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
Was it working before and suddenly stopped? What changes have you made?
16 replies