© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
9 replies
zoomZoom

Actions : disabled() and hidden() are the same

public function editAction()
{
    return Action::make('edit')
        ->icon('heroicon-m-pencil-square')
        // ->iconButton()
        ->mountUsing(function (array $arguments, Form $form) {
            $this->article = ArticleModel::find($arguments['articleId']);
            // $form->fill($this->article->toArray());
            $form->fill([
                'title' => $this->article->title,
            ]);
        })
        ->form([
            TextInput::make('title')
                ->label('Titre')
                ->required(),
        ])
        ->action(function (array $data): void {
            $this->article->update($data);
        })->hidden(true);
}
public function editAction()
{
    return Action::make('edit')
        ->icon('heroicon-m-pencil-square')
        // ->iconButton()
        ->mountUsing(function (array $arguments, Form $form) {
            $this->article = ArticleModel::find($arguments['articleId']);
            // $form->fill($this->article->toArray());
            $form->fill([
                'title' => $this->article->title,
            ]);
        })
        ->form([
            TextInput::make('title')
                ->label('Titre')
                ->required(),
        ])
        ->action(function (array $data): void {
            $this->article->update($data);
        })->hidden(true);
}

<div> {{ ($this->editAction)(['articleId' => $article->id]) }} </div>
<div> {{ ($this->editAction)(['articleId' => $article->id]) }} </div>


If i do hidden(true) the result is the same as disabled() .

The button is there but not clickable.

Is this the wanted behavior ? I thought hidden meant not visible ?

Have a good day ! 🚀
Screenshot_2023-10-30_at_11.16.58.jpg
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Actions with ->hidden() showing disabled and not hidden inside infolists
FilamentFFilament / ❓┊help
5mo ago
Bug? Actions show disabled when set to hidden
FilamentFFilament / ❓┊help
3y ago
Possible Bug in Action ->disabled() and ->hidden()
FilamentFFilament / ❓┊help
2y ago
field disabled on the edit page and hidden on the create new record page
FilamentFFilament / ❓┊help
3y ago