livewire / flux

The official Livewire UI component library
https://fluxui.dev
488 stars 42 forks source link

Clearable select not working with model.live #662

Closed MiguelLaforest closed 1 week ago

MiguelLaforest commented 1 week ago

The field is cleared, but the update event isn't sent, i.e., the URL query string isn't updated and the page doesn't re-render.

#[Url]
public string $selectable = '';

public array $selectables = ['a', 'b', 'c'];
<flux:select
    wire:model.live="selectable"
    :label="__('Selectable')"
    :placeholder="__('Select a selectable')"
    clearable="true"
    variant="listbox"
>
    @foreach($selectables as $selectable)
        <flux:option>{{ $selectable }}</flux:option>
    @endforeach
</flux:select>
ju5t commented 1 week ago

Which version of Flux are you using? I haven't been able to test it yet, but v1.0.23 should have solved it.

MiguelLaforest commented 1 week ago

Yeah, that's what I thought, but I am on 1.0.23 and I cleared the views.

Edit: Never mind, I ran composer update this morning for 1.0.23 and it seem Flux didn't actually update, I'm the problem and it works as it should!