multi-select with relationship not returning data

Good afternoon.
I'm currently trying to make a Filament action on a livewire page which sends a message to selected users.
To select the users I'm using a multi-select. And I added a createOptionForm so a user can add additional users they want to message. This all works wonderful, except when I submit the form the data doesn't to exist (see picture).

I don't know if this is a bug in Filament or if I'm doing something wrong.

Said select
Forms\Components\Select::make('receivers')
  ->label('Ontvanger')
  ->required()
  ->relationship('receiver', 'email')
  ->searchable()
  ->preload()
  ->multiple()
  ->options(Auth::user()->contacts()->pluck('email', 'id'))
  ->createOptionForm([
      Hidden::make('owner_id')
        ->default(Auth::id()),
      Hidden::make('owner_type')
        ->default(User::class),
      TextInput::make('name')
         ->label('Naam')
         ->required(),
      TextInput::make('email')
         ->required()
         ->email(),
]),


How I catch the data from the form

->action(function (array $data) {
    dd($data);
})
image.png
Was this page helpful?