Hello!
I'm encountering an issue when using select variant=listbox.
I'm using a livewire component with a $profiles property containing the following sample Eloquent collection that I want to use as a source in a select:
[
[
"id" => 1,
"name" => "profile1",
],
[
"id" => 2,
"name" => "profile2",
],
]
I also have a property $subscriber_profile_id = 1 matching my first profile.
Consider the basic select example below:
<flux:select label="Profile" wire:model="subscriber_profile_id">
@foreach ($profiles as $profile)
<flux:option wire:key="{{ $profile->id }}" value="{{ $profile->id }}">
{{ $profile->name }}
</flux:option>
@endforeach
</flux:select>
It works just fine:

As you can see the $subscriber_profile_id (containing the value 1) is correctly displayed using the wire:model property.
But whenever I use the variant=listbox:
<flux:select label="Profile" variant="listbox" wire:model="subscriber_profile_id">
@foreach ($profiles as $profile)
<flux:option wire:key="{{ $profile->id }}" value="{{ $profile->id }}">
{{ $profile->name }}
</flux:option>
@endforeach
</flux:select>

The field does not select the associated select value.
Am I missing something here or is that a bug?
Thank you!
Hello!
I'm encountering an issue when using select variant=listbox.
I'm using a livewire component with a $profiles property containing the following sample Eloquent collection that I want to use as a source in a select:
I also have a property
$subscriber_profile_id = 1matching my first profile.Consider the basic select example below:
It works just fine:

As you can see the
$subscriber_profile_id(containing the value 1) is correctly displayed using thewire:modelproperty.But whenever I use the variant=listbox:
The field does not select the associated select value.
Am I missing something here or is that a bug?
Thank you!