F
Filament5mo ago
Pan

Relation Manager customizing AssosciateAction to use multiples and updating a field based on another

I have a relation manager called EquipmentsRelationManager under UserResource. I added the Tables\Actions\AssociateAction::make() at the headerActions, however I want it to be multiple instead of having to manually press the "Associate & Associate another" as instead I want to use like in the Filament Demo wherein the categories can easily add multiple categories Filament Demo:
Forms\Components\Select::make('categories')
->relationship('categories', 'name')
->multiple()
->required(),
Forms\Components\Select::make('categories')
->relationship('categories', 'name')
->multiple()
->required(),
Currently here is what I hope is working but it doesnt
->headerActions([
Tables\Actions\AssociateAction::make(),
Tables\Actions\Action::make('Borrow')
->form([
Forms\Components\Select::make('barcode')
->searchable()
->multiple()
]),
->headerActions([
Tables\Actions\AssociateAction::make(),
Tables\Actions\Action::make('Borrow')
->form([
Forms\Components\Select::make('barcode')
->searchable()
->multiple()
]),
I also want to know how if the table equipment field foreign id for user_id, that if it nots null, one of the field is be updated too, if you have any idea please share.
0 Replies
No replies yetBe the first to reply to this messageJoin