Bug? Actions show disabled when set to hidden

Using actions on a LW Component, we have for example:


eturn Action::make('loadDraft')
            ->visible(fn () => MyModel::where('id', '=', $this->id)
                ->where('is_draft', '=', true)
                ->where('user_id', '=', auth()->user()?->id)->count() >= 1)
            ->label('Load a Draft')
            ->modalWidth('md')
            ->form([
                Select::make('id')
                    ->hiddenLabel()
                    ->options(
                        MyModel::where('id', '=', $this->instance_id)
                            ->where('is_draft', '=', true)
                            ->where('user_id', '=', auth()->user()?->id)
                            ->orderBy('created_at', 'desc')
                            ->pluck('created_at', 'id') 
                            ->map(function ($item, $key) {
                                return $item->format('d M Y - H:i:s');
                            })

                    ),
            ])
            ->action(function ($data) {
                dd($date);
            });


The action button shows greys out, disabled should only do that, now visible/disabled
Solution
You should check the visibility if you are using the standalone mode
Standalone action not hiding
Was this page helpful?