Closed lee-to closed 2 months ago
public function components(): array { $components = request()->has('id') ? [ FlexibleRender::make("Condition #" . request()->input('query.id')), ] : [ FlexibleRender::make("Empty condition"), ]; return [ ActionButton::make('Change fragment', fn($id) => "?id=$id") ->setItem(30) ->dispatchEvent( AlpineJs::event(JsEvent::FRAGMENT_UPDATED, 'main-page-fragment', ['id' => 3]) ) , Fragment::make($components) ->name('main-page-fragment') , ]; }