Toggle::make('showStatus')->live(),Select::make('status') ->default('published') ->selectablePlaceholder(false) ->visible(fn (Get $get) => $get('showStatus')) ->options([ 'draft' => 'Draft', 'reviewing' => 'Reviewing', 'published' => 'Published', ]),
extraItemAction
$this->extraItemActions([ Action::make('toggleVisibility') ->icon(fn ($state, array $arguments) => $state[$arguments['item']]['data']['visible'] ? 'heroicon-o-eye' : 'heroicon-o-eye-slash') ->action(function (array $arguments, Builder $component) { $state = $component->getState(); $state[$arguments['item']]['data']['visible'] = ! $state[$arguments['item']]['data']['visible']; $component->state($state); }),...
Forms\Components\TextInput::make('test1') ->live() ->afterStateUpdated(function (Forms\Get $get, Forms\Set $set) { $set('test2', [ 'txt' => $get('test1'), ]); }), Forms\Components\KeyValue::make('test2') ->default(['txt' => '']),
Textarea::make() ->rows(3) ->hintAction( Forms\Components\Actions\Action::make('generate_title') ->icon('heroicon-o-arrow-path') ->action(function (?Role $record, Set $set) { ray($record);...