F
Filament16mo ago
Wazza

Refresh RelationManager on dropdown

Hi all you smart individuals, I have a question about relationshipmanagers, I have one in my system call teams and Im wanting to filter the Relationship Manager by the organisaiton ID that is passed in, however it would be nice iff I could update the relationshipmanager when I changhe the option in my drop down
Forms\Components\Section::make('Associated Organisation')->schema([
Forms\Components\Select::make('organisation_id')
->label('Organisation')
->required()
->options(Organisation::all()->pluck('name', 'id'))
->live(),
]),
Forms\Components\Section::make('Associated Organisation')->schema([
Forms\Components\Select::make('organisation_id')
->label('Organisation')
->required()
->options(Organisation::all()->pluck('name', 'id'))
->live(),
]),
Is there anyway I can emit an event to the relationshipmanager and refresh it I did try this
Forms\Components\Section::make('Associated Organisation')->schema([
Forms\Components\Select::make('organisation_id')
->label('Organisation')
->dispatchEvent('refreshExampleRelationManager')
->required()
->options(Organisation::all()->pluck('name', 'id'))
->live(),
]),
Forms\Components\Section::make('Associated Organisation')->schema([
Forms\Components\Select::make('organisation_id')
->label('Organisation')
->dispatchEvent('refreshExampleRelationManager')
->required()
->options(Organisation::all()->pluck('name', 'id'))
->live(),
]),
With Disptach Event and on my relationshipmanager I have this
protected $listeners = ['refreshExampleRelationManager' => '$refresh'];
protected $listeners = ['refreshExampleRelationManager' => '$refresh'];
I think I might be doing this all wrong and might need some guidance, im pretty new to all of this and just trying to go off guides and ect so far... Thanks in advance
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server