F
Filament13mo ago
Abrar

How to add text field in relationship manager header?

Hi, I have a rooms relationship and I want to have a general description for all rooms. general_description fields is part of belongs to model but I want to show it at top of relationship manager. Is there a way to achieve this?
5 Replies
DrByte
DrByte13mo ago
I wonder if the panels::resource.relation-manager.before render hook can be used? https://filamentphp.com/docs/3.x/support/render-hooks#panel-builder-render-hooks
Abrar
AbrarOP13mo ago
I can render blade or livewire using hook. But how field will attach to the current model in edit?
Dennis Koch
Dennis Koch13mo ago
You could try wire:model="data.your_fields_key" Probably won't work since the form and the relation manager are separate components
Abrar
AbrarOP13mo ago
Yeah
Dennis Koch
Dennis Koch13mo ago
You could try emitting an event from the RM that updates a hidden field on the form

Did you find this page helpful?